aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/xfs
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_dfrag.c8
-rw-r--r--fs/xfs/xfs_file.c4
-rw-r--r--fs/xfs/xfs_ioctl.c6
-rw-r--r--fs/xfs/xfs_ioctl32.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
index d0e9c74d3d96..75d854b0c439 100644
--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -78,14 +78,14 @@ xfs_swapext(
78 goto out_put_tmp_file; 78 goto out_put_tmp_file;
79 } 79 }
80 80
81 if (IS_SWAPFILE(f.file->f_path.dentry->d_inode) || 81 if (IS_SWAPFILE(file_inode(f.file)) ||
82 IS_SWAPFILE(tmp.file->f_path.dentry->d_inode)) { 82 IS_SWAPFILE(file_inode(tmp.file))) {
83 error = XFS_ERROR(EINVAL); 83 error = XFS_ERROR(EINVAL);
84 goto out_put_tmp_file; 84 goto out_put_tmp_file;
85 } 85 }
86 86
87 ip = XFS_I(f.file->f_path.dentry->d_inode); 87 ip = XFS_I(file_inode(f.file));
88 tip = XFS_I(tmp.file->f_path.dentry->d_inode); 88 tip = XFS_I(file_inode(tmp.file));
89 89
90 if (ip->i_mount != tip->i_mount) { 90 if (ip->i_mount != tip->i_mount) {
91 error = XFS_ERROR(EINVAL); 91 error = XFS_ERROR(EINVAL);
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 67284edb84d7..f03bf1a456fb 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -811,7 +811,7 @@ xfs_file_fallocate(
811 loff_t offset, 811 loff_t offset,
812 loff_t len) 812 loff_t len)
813{ 813{
814 struct inode *inode = file->f_path.dentry->d_inode; 814 struct inode *inode = file_inode(file);
815 long error; 815 long error;
816 loff_t new_size = 0; 816 loff_t new_size = 0;
817 xfs_flock64_t bf; 817 xfs_flock64_t bf;
@@ -912,7 +912,7 @@ xfs_file_readdir(
912 void *dirent, 912 void *dirent,
913 filldir_t filldir) 913 filldir_t filldir)
914{ 914{
915 struct inode *inode = filp->f_path.dentry->d_inode; 915 struct inode *inode = file_inode(filp);
916 xfs_inode_t *ip = XFS_I(inode); 916 xfs_inode_t *ip = XFS_I(inode);
917 int error; 917 int error;
918 size_t bufsize; 918 size_t bufsize;
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index c1c3ef88a260..d681e34c2950 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -80,7 +80,7 @@ xfs_find_handle(
80 f = fdget(hreq->fd); 80 f = fdget(hreq->fd);
81 if (!f.file) 81 if (!f.file)
82 return -EBADF; 82 return -EBADF;
83 inode = f.file->f_path.dentry->d_inode; 83 inode = file_inode(f.file);
84 } else { 84 } else {
85 error = user_lpath((const char __user *)hreq->path, &path); 85 error = user_lpath((const char __user *)hreq->path, &path);
86 if (error) 86 if (error)
@@ -168,7 +168,7 @@ xfs_handle_to_dentry(
168 /* 168 /*
169 * Only allow handle opens under a directory. 169 * Only allow handle opens under a directory.
170 */ 170 */
171 if (!S_ISDIR(parfilp->f_path.dentry->d_inode->i_mode)) 171 if (!S_ISDIR(file_inode(parfilp)->i_mode))
172 return ERR_PTR(-ENOTDIR); 172 return ERR_PTR(-ENOTDIR);
173 173
174 if (hlen != sizeof(xfs_handle_t)) 174 if (hlen != sizeof(xfs_handle_t))
@@ -1334,7 +1334,7 @@ xfs_file_ioctl(
1334 unsigned int cmd, 1334 unsigned int cmd,
1335 unsigned long p) 1335 unsigned long p)
1336{ 1336{
1337 struct inode *inode = filp->f_path.dentry->d_inode; 1337 struct inode *inode = file_inode(filp);
1338 struct xfs_inode *ip = XFS_I(inode); 1338 struct xfs_inode *ip = XFS_I(inode);
1339 struct xfs_mount *mp = ip->i_mount; 1339 struct xfs_mount *mp = ip->i_mount;
1340 void __user *arg = (void __user *)p; 1340 void __user *arg = (void __user *)p;
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c
index 1244274a5674..63b8fc432151 100644
--- a/fs/xfs/xfs_ioctl32.c
+++ b/fs/xfs/xfs_ioctl32.c
@@ -530,7 +530,7 @@ xfs_file_compat_ioctl(
530 unsigned cmd, 530 unsigned cmd,
531 unsigned long p) 531 unsigned long p)
532{ 532{
533 struct inode *inode = filp->f_path.dentry->d_inode; 533 struct inode *inode = file_inode(filp);
534 struct xfs_inode *ip = XFS_I(inode); 534 struct xfs_inode *ip = XFS_I(inode);
535 struct xfs_mount *mp = ip->i_mount; 535 struct xfs_mount *mp = ip->i_mount;
536 void __user *arg = (void __user *)p; 536 void __user *arg = (void __user *)p;