Skip to contentSkip to conversation

btrfs: remove redundant error check

PATCH New Byongho Lee 1 participant 1 message Jan 27, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/btrfs/ioctl.c | 4 ----
 1 file changed, 4 deletions(-)
fs/btrfs/ioctl.c +0 -4
index 1568f57a3376..d2f29c70d865 100644
@@ -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;
Signature · 1 line
2.7.0