summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorByongho Lee <bhlee.kernel@gmail.com>2016-01-27 19:11:53 +0900
committerDavid Sterba <dsterba@suse.com>2016-02-18 11:35:27 +0100
commitac1407ba24d69015f88da18bfac978c493380b81 (patch)
tree45efe673f25a69d6dc85858e7fd9ac08920e97bc /fs/btrfs
parent0138b6fe8f7ea6aa83ed7ccfcabc89b490528ce8 (diff)
downloadlinux-ac1407ba24d69015f88da18bfac978c493380b81.tar.gz
linux-ac1407ba24d69015f88da18bfac978c493380b81.tar.bz2
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/btrfs')
-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;