don't open-code file_inode()

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2016-12-04 18:24:56 -05:00
commit 450630975d
18 changed files with 40 additions and 46 deletions

View file

@ -52,7 +52,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
arg |= O_NONBLOCK;
/* Pipe packetized mode is controlled by O_DIRECT flag */
if (!S_ISFIFO(filp->f_inode->i_mode) && (arg & O_DIRECT)) {
if (!S_ISFIFO(inode->i_mode) && (arg & O_DIRECT)) {
if (!filp->f_mapping || !filp->f_mapping->a_ops ||
!filp->f_mapping->a_ops->direct_IO)
return -EINVAL;