Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac1407ba authored by Byongho Lee's avatar Byongho Lee Committed by David Sterba
Browse files

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: default avatarByongho Lee <bhlee.kernel@gmail.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0138b6fe
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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;