aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Sandoval <[email protected]>2022-03-09 17:31:37 -0800
committerDavid Sterba <[email protected]>2022-05-16 17:03:06 +0200
commitc51fa51190f9909c5cb9bbdddb1ad845d6e71a33 (patch)
tree9af2d6ebf56f841be5401d9b118cdcb60628516f
parent6d831f7ef9f0cecef7ae1f6f55c5739d6f3b9143 (diff)
btrfs: remove unnecessary set_nlink() in btrfs_create_subvol_root()
btrfs_new_inode() already returns an inode with nlink set to 1 (via inode_init_always()). Get rid of the unnecessary set. Reviewed-by: Sweet Tea Dorminy <[email protected]> Signed-off-by: Omar Sandoval <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
-rw-r--r--fs/btrfs/inode.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c3d0529960ca..e372cf6873c2 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8777,7 +8777,6 @@ int btrfs_create_subvol_root(struct btrfs_trans_handle *trans,
inode->i_op = &btrfs_dir_inode_operations;
inode->i_fop = &btrfs_dir_file_operations;
- set_nlink(inode, 1);
unlock_new_inode(inode);
err = btrfs_subvol_inherit_props(trans, new_root, parent_root);