Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Byongho Lee and committed by
David Sterba
ac1407ba 0138b6fe

-4
-4
fs/btrfs/ioctl.c
··· 844 844 if (IS_ERR(dentry)) 845 845 goto out_unlock; 846 846 847 - error = -EEXIST; 848 - if (d_really_is_positive(dentry)) 849 - goto out_dput; 850 - 851 847 error = btrfs_may_create(dir, dentry); 852 848 if (error) 853 849 goto out_dput;