瀏覽代碼

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>
Byongho Lee 9 年之前
父節點
當前提交
ac1407ba24
共有 1 個文件被更改,包括 0 次插入4 次删除
  1. 0 4
      fs/btrfs/ioctl.c

+ 0 - 4
fs/btrfs/ioctl.c

@@ -844,10 +844,6 @@ static noinline int btrfs_mksubvol(struct path *parent,
 	if (IS_ERR(dentry))
 	if (IS_ERR(dentry))
 		goto out_unlock;
 		goto out_unlock;
 
 
-	error = -EEXIST;
-	if (d_really_is_positive(dentry))
-		goto out_dput;
-
 	error = btrfs_may_create(dir, dentry);
 	error = btrfs_may_create(dir, dentry);
 	if (error)
 	if (error)
 		goto out_dput;
 		goto out_dput;