diff options
| author | Mateusz Guzik <mjguzik@gmail.com> | 2026-04-21 20:25:36 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-05-11 23:12:28 +0200 |
| commit | 769e143b115a4af75ecbc6d4e39d58b3e6fe2099 (patch) | |
| tree | 0a7f60cf4f5f39aca2505890e0f625abd715dff2 /fs/ceph/mds_client.c | |
| parent | 254f49634ee16a731174d2ae34bc50bd5f45e731 (diff) | |
| download | linux-next-769e143b115a4af75ecbc6d4e39d58b3e6fe2099.tar.gz linux-next-769e143b115a4af75ecbc6d4e39d58b3e6fe2099.zip | |
fs: add icount_read_once() and stop open-coding ->i_count loads
Similarly to inode_state_read_once(), it makes the caller spell out
they acknowledge instability of the returned value.
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://patch.msgid.link/20260421182538.1215894-2-mjguzik@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/ceph/mds_client.c')
| -rw-r--r-- | fs/ceph/mds_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index ed17e0023705..0edb6a251501 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2267,7 +2267,7 @@ static int trim_caps_cb(struct inode *inode, int mds, void *arg) int count; dput(dentry); d_prune_aliases(inode); - count = icount_read(inode); + count = icount_read_once(inode); if (count == 1) (*remaining)--; doutc(cl, "%p %llx.%llx cap %p pruned, count now %d\n", |
