]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: get rid of btrfs_add_nondir()
authorOmar Sandoval <osandov@fb.com>
Thu, 10 Mar 2022 01:31:34 +0000 (17:31 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:06 +0000 (17:03 +0200)
commite837b87a86db63849e1eef2a4c664d95a81bb7a1
tree164198648c53a09de3eba604570d9d831b506b47
parente603e7b4b352b4e8e8254c23791eed8086db2892
btrfs: get rid of btrfs_add_nondir()

This is a trivial wrapper around btrfs_add_link(). The only thing it
does other than moving arguments around is translating a > 0 return
value to -EEXIST. As far as I can tell, btrfs_add_link() won't return >
0 (and if it did, the existing callsites in, e.g., btrfs_mkdir() would
be broken). The check itself dates back to commit 2c90e5d65842 ("Btrfs:
still corruption hunting"), so it's probably left over from debugging.
Let's just get rid of btrfs_add_nondir().

Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c