From: Omar Sandoval Date: Thu, 10 Mar 2022 01:31:36 +0000 (-0800) Subject: btrfs: remove unnecessary inode_set_bytes(0) call X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6d831f7ef9f0cecef7ae1f6f55c5739d6f3b9143;p=linux.git 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 --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index b5059b16e3d8f..c3d0529960cac 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;