diff options
author | David Howells <dhowells@redhat.com> | 2021-03-29 13:53:50 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2021-08-27 13:34:03 +0100 |
commit | 20ec197bfa13c5b799fc9527790ea7b5374fc8f2 (patch) | |
tree | 77224ac38587572748156ae6bf02835a74585afb /fs/fscache/fsdef.c | |
parent | 33cba859220b0878b3b2931caa1629a3d2432379 (diff) | |
download | linux-next-20ec197bfa13c5b799fc9527790ea7b5374fc8f2.tar.gz |
fscache: Use refcount_t for the cookie refcount instead of atomic_t
Use refcount_t for the fscache_cookie refcount instead of atomic_t and
rename the 'usage' member to 'ref' in such cases. The tracepoints that
reference it change from showing "u=%d" to "r=%d".
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/r/162431204358.2908479.8006938388213098079.stgit@warthog.procyon.org.uk/
Diffstat (limited to 'fs/fscache/fsdef.c')
-rw-r--r-- | fs/fscache/fsdef.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fscache/fsdef.c b/fs/fscache/fsdef.c index 5f8f6fe243fe..0402673c680e 100644 --- a/fs/fscache/fsdef.c +++ b/fs/fscache/fsdef.c @@ -46,7 +46,7 @@ static struct fscache_cookie_def fscache_fsdef_index_def = { struct fscache_cookie fscache_fsdef_index = { .debug_id = 1, - .usage = ATOMIC_INIT(1), + .ref = REFCOUNT_INIT(1), .n_active = ATOMIC_INIT(1), .lock = __SPIN_LOCK_UNLOCKED(fscache_fsdef_index.lock), .backing_objects = HLIST_HEAD_INIT, |