diff mbox

[RESEND] fs: btrfs: new helper: file_inode(file)

Message ID 52A8004F.4090705@huawei.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Libo Chen Dec. 11, 2013, 6:03 a.m. UTC
Signed-off-by: Libo Chen <clbchenlibo.chen@huawei.com>
---
 fs/btrfs/ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

 - just change style
diff mbox

Patch

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a111622..fdfc0d7 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2690,7 +2690,7 @@  static long btrfs_ioctl_file_extent_same(struct file *file,
 	struct btrfs_ioctl_same_args tmp;
 	struct btrfs_ioctl_same_args *same;
 	struct btrfs_ioctl_same_extent_info *info;
-	struct inode *src = file->f_dentry->d_inode;
+	struct inode *src = file_inode(file);
 	struct file *dst_file = NULL;
 	struct inode *dst;
 	u64 off;
@@ -2779,7 +2779,7 @@  static long btrfs_ioctl_file_extent_same(struct file *file,
 		if (file->f_path.mnt != dst_file->f_path.mnt)
 			goto next;

-		dst = dst_file->f_dentry->d_inode;
+		dst = file_inode(dst_file);
 		if (src->i_sb != dst->i_sb)
 			goto next;