diff options
author | Trond Myklebust <trondmy@gmail.com> | 2020-01-14 18:02:44 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2020-02-06 17:22:55 +0100 |
commit | 689827cd5bfe89e4900db7e1c0c713083a76d04c (patch) | |
tree | 278059c769f2fa8e2fa318d37c075a33fc347097 /fs/nfsd/filecache.h | |
parent | nfsd: Define the file access mode enum for tracing (diff) | |
download | linux-689827cd5bfe89e4900db7e1c0c713083a76d04c.tar.xz linux-689827cd5bfe89e4900db7e1c0c713083a76d04c.zip |
nfsd: convert file cache to use over/underflow safe refcount
Use the 'refcount_t' type instead of 'atomic_t' for improved
refcounting safety.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/filecache.h')
-rw-r--r-- | fs/nfsd/filecache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/filecache.h b/fs/nfsd/filecache.h index 986c325a54bd..7872df5a0fe3 100644 --- a/fs/nfsd/filecache.h +++ b/fs/nfsd/filecache.h @@ -19,7 +19,7 @@ */ struct nfsd_file_mark { struct fsnotify_mark nfm_mark; - atomic_t nfm_ref; + refcount_t nfm_ref; }; /* @@ -43,7 +43,7 @@ struct nfsd_file { unsigned long nf_flags; struct inode *nf_inode; unsigned int nf_hashval; - atomic_t nf_ref; + refcount_t nf_ref; unsigned char nf_may; struct nfsd_file_mark *nf_mark; struct rw_semaphore nf_rwsem; |