diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 17:07:38 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:31 -0500 |
| commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
| tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/fat | |
| parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) | |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fat')
| -rw-r--r-- | fs/fat/dir.c | 6 | ||||
| -rw-r--r-- | fs/fat/file.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/fat/dir.c b/fs/fat/dir.c index 58bf744dbf39..165012ef363a 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c | |||
| @@ -698,7 +698,7 @@ out: | |||
| 698 | 698 | ||
| 699 | static int fat_readdir(struct file *filp, void *dirent, filldir_t filldir) | 699 | static int fat_readdir(struct file *filp, void *dirent, filldir_t filldir) |
| 700 | { | 700 | { |
| 701 | struct inode *inode = filp->f_path.dentry->d_inode; | 701 | struct inode *inode = file_inode(filp); |
| 702 | return __fat_readdir(inode, filp, dirent, filldir, 0, 0); | 702 | return __fat_readdir(inode, filp, dirent, filldir, 0, 0); |
| 703 | } | 703 | } |
| 704 | 704 | ||
| @@ -779,7 +779,7 @@ static int fat_ioctl_readdir(struct inode *inode, struct file *filp, | |||
| 779 | static long fat_dir_ioctl(struct file *filp, unsigned int cmd, | 779 | static long fat_dir_ioctl(struct file *filp, unsigned int cmd, |
| 780 | unsigned long arg) | 780 | unsigned long arg) |
| 781 | { | 781 | { |
| 782 | struct inode *inode = filp->f_path.dentry->d_inode; | 782 | struct inode *inode = file_inode(filp); |
| 783 | struct __fat_dirent __user *d1 = (struct __fat_dirent __user *)arg; | 783 | struct __fat_dirent __user *d1 = (struct __fat_dirent __user *)arg; |
| 784 | int short_only, both; | 784 | int short_only, both; |
| 785 | 785 | ||
| @@ -819,7 +819,7 @@ FAT_IOCTL_FILLDIR_FUNC(fat_compat_ioctl_filldir, compat_dirent) | |||
| 819 | static long fat_compat_dir_ioctl(struct file *filp, unsigned cmd, | 819 | static long fat_compat_dir_ioctl(struct file *filp, unsigned cmd, |
| 820 | unsigned long arg) | 820 | unsigned long arg) |
| 821 | { | 821 | { |
| 822 | struct inode *inode = filp->f_path.dentry->d_inode; | 822 | struct inode *inode = file_inode(filp); |
| 823 | struct compat_dirent __user *d1 = compat_ptr(arg); | 823 | struct compat_dirent __user *d1 = compat_ptr(arg); |
| 824 | int short_only, both; | 824 | int short_only, both; |
| 825 | 825 | ||
diff --git a/fs/fat/file.c b/fs/fat/file.c index a62e0ecbe2db..3978f8ca1823 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c | |||
| @@ -32,7 +32,7 @@ static int fat_ioctl_get_attributes(struct inode *inode, u32 __user *user_attr) | |||
| 32 | 32 | ||
| 33 | static int fat_ioctl_set_attributes(struct file *file, u32 __user *user_attr) | 33 | static int fat_ioctl_set_attributes(struct file *file, u32 __user *user_attr) |
| 34 | { | 34 | { |
| 35 | struct inode *inode = file->f_path.dentry->d_inode; | 35 | struct inode *inode = file_inode(file); |
| 36 | struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); | 36 | struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); |
| 37 | int is_dir = S_ISDIR(inode->i_mode); | 37 | int is_dir = S_ISDIR(inode->i_mode); |
| 38 | u32 attr, oldattr; | 38 | u32 attr, oldattr; |
| @@ -116,7 +116,7 @@ out: | |||
| 116 | 116 | ||
| 117 | long fat_generic_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 117 | long fat_generic_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
| 118 | { | 118 | { |
| 119 | struct inode *inode = filp->f_path.dentry->d_inode; | 119 | struct inode *inode = file_inode(filp); |
| 120 | u32 __user *user_attr = (u32 __user *)arg; | 120 | u32 __user *user_attr = (u32 __user *)arg; |
| 121 | 121 | ||
| 122 | switch (cmd) { | 122 | switch (cmd) { |
