summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorByongho Lee <bhlee.kernel@gmail.com>2016-01-27 11:11:53 +0100
committerDavid Sterba <dsterba@suse.com>2016-02-18 11:35:27 +0100
commitac1407ba24d69015f88da18bfac978c493380b81 (patch)
tree45efe673f25a69d6dc85858e7fd9ac08920e97bc /fs
parentbtrfs: simplify expression in btrfs_calc_trans_metadata_size() (diff)
downloadlinux-ac1407ba24d69015f88da18bfac978c493380b81.tar.xz
linux-ac1407ba24d69015f88da18bfac978c493380b81.zip
btrfs: remove redundant error check
While running btrfs_mksubvol(), d_really_is_positive() is called twice. First in btrfs_mksubvol() and second inside btrfs_may_create(). So I remove the first one. Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ioctl.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 952172ca7e45..e65fdc8550b1 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -844,10 +844,6 @@ static noinline int btrfs_mksubvol(struct path *parent,
if (IS_ERR(dentry))
goto out_unlock;
- error = -EEXIST;
- if (d_really_is_positive(dentry))
- goto out_dput;
-
error = btrfs_may_create(dir, dentry);
if (error)
goto out_dput;