diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2025-08-21 23:18:21 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-08-27 14:12:48 +0300 |
| commit | bc986b1d756482a5ec2d7d9625229d9b9df95ae1 (patch) | |
| tree | 7268322647363c5d1f213a74962235f46e1cb98c | |
| parent | f0883b9c395ecdf7e66a58b6027fd35056cf152c (diff) | |
| download | linux-bc986b1d756482a5ec2d7d9625229d9b9df95ae1.tar.xz | |
fs: stop accessing ->i_count directly in f2fs and gfs2
Instead of accessing ->i_count directly in these file systems, use the
appropriate __iget and iput helpers.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/b8e6eb8a3e690ce082828d3580415bf70dfa93aa.1755806649.git.josef@toxicpanda.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
| -rw-r--r-- | fs/f2fs/super.c | 4 | ||||
| -rw-r--r-- | fs/gfs2/ops_fstype.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 1db024b20e29..2045642cfe3b 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1750,7 +1750,7 @@ static int f2fs_drop_inode(struct inode *inode) if ((!inode_unhashed(inode) && inode->i_state & I_SYNC)) { if (!inode->i_nlink && !is_bad_inode(inode)) { /* to avoid evict_inode call simultaneously */ - atomic_inc(&inode->i_count); + __iget(inode); spin_unlock(&inode->i_lock); /* should remain fi->extent_tree for writepage */ @@ -1769,7 +1769,7 @@ static int f2fs_drop_inode(struct inode *inode) sb_end_intwrite(inode->i_sb); spin_lock(&inode->i_lock); - atomic_dec(&inode->i_count); + iput(inode); } trace_f2fs_drop_inode(inode, 0); return 0; diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index efe99b732551..c770006f8889 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1754,7 +1754,7 @@ static void gfs2_evict_inodes(struct super_block *sb) spin_unlock(&inode->i_lock); continue; } - atomic_inc(&inode->i_count); + __iget(inode); spin_unlock(&inode->i_lock); spin_unlock(&sb->s_inode_list_lock); |
