From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 01/11] btrfs: pass a btrfs_inode to btrfs_readdir_put_delayed_items()
Date: Mon, 24 Jun 2024 18:23:03 +0200 [thread overview]
Message-ID: <9864e42f509d4c2cbdca070f4ee2cb4852ca3632.1719246104.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1719246104.git.dsterba@suse.com>
Pass a struct btrfs_inode to btrfs_readdir_put_delayed_items() as it's
an internal interface, allowing to remove some use of BTRFS_I.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/delayed-inode.c | 4 ++--
fs/btrfs/delayed-inode.h | 2 +-
fs/btrfs/inode.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index 7b8b1bd0ca39..3a1b6e120959 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -1730,7 +1730,7 @@ bool btrfs_readdir_get_delayed_items(struct inode *inode,
return true;
}
-void btrfs_readdir_put_delayed_items(struct inode *inode,
+void btrfs_readdir_put_delayed_items(struct btrfs_inode *inode,
struct list_head *ins_list,
struct list_head *del_list)
{
@@ -1752,7 +1752,7 @@ void btrfs_readdir_put_delayed_items(struct inode *inode,
* The VFS is going to do up_read(), so we need to downgrade back to a
* read lock.
*/
- downgrade_write(&inode->i_rwsem);
+ downgrade_write(&inode->vfs_inode.i_rwsem);
}
int btrfs_should_delete_dir_index(const struct list_head *del_list,
diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h
index 654c04d38fb3..e30ba7962d44 100644
--- a/fs/btrfs/delayed-inode.h
+++ b/fs/btrfs/delayed-inode.h
@@ -147,7 +147,7 @@ bool btrfs_readdir_get_delayed_items(struct inode *inode,
u64 last_index,
struct list_head *ins_list,
struct list_head *del_list);
-void btrfs_readdir_put_delayed_items(struct inode *inode,
+void btrfs_readdir_put_delayed_items(struct btrfs_inode *inode,
struct list_head *ins_list,
struct list_head *del_list);
int btrfs_should_delete_dir_index(const struct list_head *del_list,
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d6c43120c5d3..6cddc7841238 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6037,7 +6037,7 @@ static int btrfs_real_readdir(struct file *file, struct dir_context *ctx)
ret = 0;
err:
if (put)
- btrfs_readdir_put_delayed_items(inode, &ins_list, &del_list);
+ btrfs_readdir_put_delayed_items(BTRFS_I(inode), &ins_list, &del_list);
btrfs_free_path(path);
return ret;
}
--
2.45.0
next prev parent reply other threads:[~2024-06-24 16:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 16:22 [PATCH 00/11] Inode type conversion David Sterba
2024-06-24 16:23 ` David Sterba [this message]
2024-06-24 16:23 ` [PATCH 02/11] btrfs: pass a btrfs_inode to btrfs_readdir_get_delayed_items() David Sterba
2024-06-24 16:23 ` [PATCH 03/11] btrfs: pass a btrfs_inode to is_data_inode() David Sterba
2024-06-24 16:23 ` [PATCH 04/11] btrfs: switch btrfs_block_group::inode to struct btrfs_inode David Sterba
2024-06-24 16:23 ` [PATCH 05/11] btrfs: pass a btrfs_inode to btrfs_ioctl_send() David Sterba
2024-06-24 16:23 ` [PATCH 06/11] btrfs: switch btrfs_pending_snapshot::dir to btrfs_inode David Sterba
2024-06-24 16:23 ` [PATCH 07/11] btrfs: switch btrfs_ordered_extent::inode to struct btrfs_inode David Sterba
2024-06-24 16:23 ` [PATCH 08/11] btrfs: pass a btrfs_inode to btrfs_compress_heuristic() David Sterba
2024-06-24 16:23 ` [PATCH 09/11] btrfs: pass a btrfs_inode to btrfs_set_prop() David Sterba
2024-06-24 16:23 ` [PATCH 10/11] btrfs: pass a btrfs_inode to btrfs_load_inode_props() David Sterba
2024-06-24 16:23 ` [PATCH 11/11] btrfs: pass a btrfs_inode to btrfs_inode_inherit_props() David Sterba
2024-06-24 18:41 ` [PATCH 00/11] Inode type conversion Boris Burkov
2024-06-26 14:06 ` Filipe Manana
2024-06-26 14:39 ` David Sterba
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=9864e42f509d4c2cbdca070f4ee2cb4852ca3632.1719246104.git.dsterba@suse.com \
--to=dsterba@suse.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