public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: linux-btrfs@vger.kernel.org
Cc: kernel-team@fb.com
Subject: [PATCH 05/12] btrfs: remove unnecessary inode_set_bytes(0) call
Date: Thu,  3 Mar 2022 15:18:55 -0800	[thread overview]
Message-ID: <af52df4e9745cef933f5bd877f466e4ac23f29da.1646348486.git.osandov@fb.com> (raw)
In-Reply-To: <cover.1646348486.git.osandov@fb.com>

From: Omar Sandoval <osandov@fb.com>

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().

Signed-off-by: Omar Sandoval <osandov@fb.com>
---
 fs/btrfs/inode.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 244e8d6ed5e4..b7d54b0b2fb5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6207,7 +6207,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;
-- 
2.35.1


  parent reply	other threads:[~2022-03-03 23:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 23:18 [PATCH 00/12] btrfs: inode creation cleanups and fixes Omar Sandoval
2022-03-03 23:18 ` [PATCH 01/12] btrfs: reserve correct number of items for unlink and rmdir Omar Sandoval
2022-03-03 23:18 ` [PATCH 02/12] btrfs: reserve correct number of items for rename Omar Sandoval
2022-03-03 23:18 ` [PATCH 03/12] btrfs: get rid of btrfs_add_nondir() Omar Sandoval
2022-03-03 23:18 ` [PATCH 04/12] btrfs: remove unnecessary btrfs_i_size_write(0) calls Omar Sandoval
2022-03-03 23:18 ` Omar Sandoval [this message]
2022-03-03 23:18 ` [PATCH 06/12] btrfs: remove unnecessary set_nlink() in btrfs_create_subvol_root() Omar Sandoval
2022-03-03 23:18 ` [PATCH 07/12] btrfs: remove unused mnt_userns parameter from __btrfs_set_acl Omar Sandoval
2022-03-03 23:18 ` [PATCH 08/12] btrfs: remove redundant name and name_len parameters to create_subvol Omar Sandoval
2022-03-03 23:18 ` [PATCH 09/12] btrfs: don't pass parent objectid to btrfs_new_inode() explicitly Omar Sandoval
2022-03-03 23:19 ` [PATCH 10/12] btrfs: move btrfs_get_free_objectid() call into btrfs_new_inode() Omar Sandoval
2022-03-03 23:19 ` [PATCH 11/12] btrfs: set inode flags earlier in btrfs_new_inode() Omar Sandoval
2022-03-03 23:19 ` [PATCH 12/12] btrfs: rework inode creation to fix several issues Omar Sandoval
2022-03-07 12:28   ` David Sterba
2022-03-10  0:18     ` Omar Sandoval
2022-03-07 13:25   ` Sweet Tea Dorminy
2022-03-10  0:20     ` Omar Sandoval
2022-03-07 14:41 ` [PATCH 00/12] btrfs: inode creation cleanups and fixes Sweet Tea Dorminy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af52df4e9745cef933f5bd877f466e4ac23f29da.1646348486.git.osandov@fb.com \
    --to=osandov@osandov.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox