From: Liu Bo Date: Fri, 29 Jun 2012 09:58:48 +0000 (-0600) Subject: Btrfs: use mnt_want_write_file instead of mnt_want_write X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e54bfa31044d602a57d4e190f6d1c3763ea76bfe;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Btrfs: use mnt_want_write_file instead of mnt_want_write mnt_want_write_file is faster when file has been opened for write. Signed-off-by: Liu Bo --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index b8034dc62e3..13ed1c9534c 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3265,7 +3265,7 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg) if (!capable(CAP_SYS_ADMIN)) return -EPERM; - ret = mnt_want_write(file->f_path.mnt); + ret = mnt_want_write_file(file); if (ret) return ret; @@ -3335,7 +3335,7 @@ out_bargs: out: mutex_unlock(&fs_info->balance_mutex); mutex_unlock(&fs_info->volume_mutex); - mnt_drop_write(file->f_path.mnt); + mnt_drop_write_file(file); return ret; }