new helper: file_inode(file)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2013-01-23 17:07:38 -05:00
parent 57eccb830f
commit 496ad9aa8e
306 changed files with 696 additions and 717 deletions

View file

@ -332,7 +332,7 @@ SYSCALL_DEFINE(sync_file_range)(int fd, loff_t offset, loff_t nbytes,
if (!f.file)
goto out;
i_mode = f.file->f_path.dentry->d_inode->i_mode;
i_mode = file_inode(f.file)->i_mode;
ret = -ESPIPE;
if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode) &&
!S_ISLNK(i_mode))