From: Leo Martins <loemra.dev@gmail.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH v2 0/2] btrfs: clean up btrfs_iget, btrfs_iget_path usage
Date: Tue, 20 Aug 2024 13:13:17 -0700 [thread overview]
Message-ID: <cover.1724184314.git.loemra.dev@gmail.com> (raw)
The first patch moves the path allocation from inside
btrfs_read_locked_inode to btrfs_iget. This makes the code easier to
reason about as it is clear where the allocation occurs and who is in
charge of freeing the path.
The second patch moves the clean up code from btrfs_iget_path into
btrfs_read_locked_inode simplifyiung btrfs_iget_path.
Version 2 includes the modifications suggested by David Sterba:
Patch 1/2:
- Added an ASSERT(path) to make sure that btrfs_read_locked_inode is
never called with a null path.
- Fixed btrfs_iget to more closely match btrfs standards.
Contiguous declaration at the top, with no non-trivial
assignments.
Leo Martins (2):
btrfs: remove conditional path allocation from read_locked_inode, add
path allocation to iget
btrfs: move clean up code from btrfs_iget_path to
btrfs_read_locked_inode
fs/btrfs/inode.c | 128 +++++++++++++++++++++++------------------------
1 file changed, 64 insertions(+), 64 deletions(-)
--
2.43.5
next reply other threads:[~2024-08-20 20:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 20:13 Leo Martins [this message]
2024-08-20 20:13 ` [PATCH v2 1/2] btrfs: remove conditional path allocation from read_locked_inode, add path allocation to iget Leo Martins
2024-08-21 17:19 ` Josef Bacik
2024-08-21 17:27 ` Josef Bacik
2024-08-20 20:13 ` [PATCH v2 2/2] btrfs: move clean up code from btrfs_iget_path to btrfs_read_locked_inode Leo Martins
2024-08-21 17:27 ` Josef Bacik
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=cover.1724184314.git.loemra.dev@gmail.com \
--to=loemra.dev@gmail.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;
as well as URLs for NNTP newsgroup(s).