mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
new helper: file_inode(file)
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
57eccb830f
commit
496ad9aa8e
306 changed files with 696 additions and 717 deletions
16
fs/pipe.c
16
fs/pipe.c
|
|
@ -361,7 +361,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
|
|||
unsigned long nr_segs, loff_t pos)
|
||||
{
|
||||
struct file *filp = iocb->ki_filp;
|
||||
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct pipe_inode_info *pipe;
|
||||
int do_wakeup;
|
||||
ssize_t ret;
|
||||
|
|
@ -486,7 +486,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
|
|||
unsigned long nr_segs, loff_t ppos)
|
||||
{
|
||||
struct file *filp = iocb->ki_filp;
|
||||
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct pipe_inode_info *pipe;
|
||||
ssize_t ret;
|
||||
int do_wakeup;
|
||||
|
|
@ -677,7 +677,7 @@ bad_pipe_w(struct file *filp, const char __user *buf, size_t count,
|
|||
|
||||
static long pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct pipe_inode_info *pipe;
|
||||
int count, buf, nrbufs;
|
||||
|
||||
|
|
@ -705,7 +705,7 @@ static unsigned int
|
|||
pipe_poll(struct file *filp, poll_table *wait)
|
||||
{
|
||||
unsigned int mask;
|
||||
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct pipe_inode_info *pipe = inode->i_pipe;
|
||||
int nrbufs;
|
||||
|
||||
|
|
@ -758,7 +758,7 @@ pipe_release(struct inode *inode, int decr, int decw)
|
|||
static int
|
||||
pipe_read_fasync(int fd, struct file *filp, int on)
|
||||
{
|
||||
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
int retval;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
|
|
@ -772,7 +772,7 @@ pipe_read_fasync(int fd, struct file *filp, int on)
|
|||
static int
|
||||
pipe_write_fasync(int fd, struct file *filp, int on)
|
||||
{
|
||||
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
int retval;
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
|
|
@ -786,7 +786,7 @@ pipe_write_fasync(int fd, struct file *filp, int on)
|
|||
static int
|
||||
pipe_rdwr_fasync(int fd, struct file *filp, int on)
|
||||
{
|
||||
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct pipe_inode_info *pipe = inode->i_pipe;
|
||||
int retval;
|
||||
|
||||
|
|
@ -1226,7 +1226,7 @@ int pipe_proc_fn(struct ctl_table *table, int write, void __user *buf,
|
|||
*/
|
||||
struct pipe_inode_info *get_pipe_info(struct file *file)
|
||||
{
|
||||
struct inode *i = file->f_path.dentry->d_inode;
|
||||
struct inode *i = file_inode(file);
|
||||
|
||||
return S_ISFIFO(i->i_mode) ? i->i_pipe : NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue