From 6d831f7ef9f0cecef7ae1f6f55c5739d6f3b9143 Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Wed, 9 Mar 2022 17:31:36 -0800 Subject: [PATCH] btrfs: remove unnecessary inode_set_bytes(0) call new_inode() always returns an inode with i_blocks and i_bytes set to 0 (via inode_init_always()). Remove the unnecessary call to inode_set_bytes() in btrfs_new_inode(). Reviewed-by: Sweet Tea Dorminy Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/inode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index b5059b16e3d8..c3d0529960ca 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6202,7 +6202,6 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans, goto fail_unlock; inode_init_owner(mnt_userns, inode, dir, mode); - inode_set_bytes(inode, 0); inode->i_mtime = current_time(inode); inode->i_atime = inode->i_mtime;