aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-11-26 03:40:43 -0500
committerChris Mason <chris.mason@fusionio.com>2012-12-16 20:46:07 -0500
commit9a8c28bec1b40e934ed28149b7eaa7d2fafed92d (patch)
tree0294b4fc799f6597ccb22a5338e53fd933a52002
parentdb2254bce4f19f458aaa05f9d00b39f413f7488c (diff)
Btrfs: pass root object into btrfs_ioctl_{start, wait}_sync()
Since we have gotten the root in the caller, just pass it into btrfs_ioctl_{start, wait}_sync() directly. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r--fs/btrfs/ioctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 9a71fec86152..5022e62e63a8 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3058,9 +3058,9 @@ long btrfs_ioctl_trans_end(struct file *file)
3058 return 0; 3058 return 0;
3059} 3059}
3060 3060
3061static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp) 3061static noinline long btrfs_ioctl_start_sync(struct btrfs_root *root,
3062 void __user *argp)
3062{ 3063{
3063 struct btrfs_root *root = BTRFS_I(file->f_dentry->d_inode)->root;
3064 struct btrfs_trans_handle *trans; 3064 struct btrfs_trans_handle *trans;
3065 u64 transid; 3065 u64 transid;
3066 int ret; 3066 int ret;
@@ -3081,9 +3081,9 @@ static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp
3081 return 0; 3081 return 0;
3082} 3082}
3083 3083
3084static noinline long btrfs_ioctl_wait_sync(struct file *file, void __user *argp) 3084static noinline long btrfs_ioctl_wait_sync(struct btrfs_root *root,
3085 void __user *argp)
3085{ 3086{
3086 struct btrfs_root *root = BTRFS_I(file->f_dentry->d_inode)->root;
3087 u64 transid; 3087 u64 transid;
3088 3088
3089 if (argp) { 3089 if (argp) {
@@ -3843,9 +3843,9 @@ long btrfs_ioctl(struct file *file, unsigned int
3843 btrfs_sync_fs(file->f_dentry->d_sb, 1); 3843 btrfs_sync_fs(file->f_dentry->d_sb, 1);
3844 return 0; 3844 return 0;
3845 case BTRFS_IOC_START_SYNC: 3845 case BTRFS_IOC_START_SYNC:
3846 return btrfs_ioctl_start_sync(file, argp); 3846 return btrfs_ioctl_start_sync(root, argp);
3847 case BTRFS_IOC_WAIT_SYNC: 3847 case BTRFS_IOC_WAIT_SYNC:
3848 return btrfs_ioctl_wait_sync(file, argp); 3848 return btrfs_ioctl_wait_sync(root, argp);
3849 case BTRFS_IOC_SCRUB: 3849 case BTRFS_IOC_SCRUB:
3850 return btrfs_ioctl_scrub(root, argp); 3850 return btrfs_ioctl_scrub(root, argp);
3851 case BTRFS_IOC_SCRUB_CANCEL: 3851 case BTRFS_IOC_SCRUB_CANCEL: