diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2025-08-26 11:39:02 -0400 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-01 12:41:09 +0200 |
| commit | 37b27bd5d6217b75d315f28b4399aad0a336f299 (patch) | |
| tree | e72e871a9c7120da2f8849523eca1cfb31f851ea /fs/fs-writeback.c | |
| parent | 9e70e985bdc2c6fe7a160e4d59ddd7c0a39bc077 (diff) | |
fs: add an icount_read helper
Instead of doing direct access to ->i_count, add a helper to handle
this. This will make it easier to convert i_count to a refcount later.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/9bc62a84c6b9d6337781203f60837bd98fbc4a96.1756222464.git.josef@toxicpanda.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/fs-writeback.c')
| -rw-r--r-- | fs/fs-writeback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index cc57367fb641..6088a67b2aae 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1767,7 +1767,7 @@ static int writeback_single_inode(struct inode *inode, int ret = 0; spin_lock(&inode->i_lock); - if (!atomic_read(&inode->i_count)) + if (!icount_read(inode)) WARN_ON(!(inode->i_state & (I_WILL_FREE|I_FREEING))); else WARN_ON(inode->i_state & I_WILL_FREE); |
