diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2022-05-11 13:02:21 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-05-26 10:50:51 -0400 |
commit | 08af54b3e5729bc1d56ad3190af811301bdc37a1 (patch) | |
tree | 3236026b452204ba36093463116df040fe9109ad /fs | |
parent | 043862b09cc00273e35e6c3a6389957953a34207 (diff) | |
download | linux-08af54b3e5729bc1d56ad3190af811301bdc37a1.tar.bz2 |
NFSD: nfsd_file_put() can sleep
Now that there are no more callers of nfsd_file_put() that might
hold a spin lock, ensure the lockdep infrastructure can catch
newly introduced calls to nfsd_file_put() made while a spinlock
is held.
Link: https://lore.kernel.org/linux-nfs/ece7fd1d-5fb3-5155-54ba-347cfc19bd9a@oracle.com/T/#mf1855552570cf9a9c80d1e49d91438cd9085aada
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/filecache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index a7e3a443a2cb..d32fcd8ad457 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -302,6 +302,8 @@ nfsd_file_put_noref(struct nfsd_file *nf) void nfsd_file_put(struct nfsd_file *nf) { + might_sleep(); + set_bit(NFSD_FILE_REFERENCED, &nf->nf_flags); if (test_bit(NFSD_FILE_HASHED, &nf->nf_flags) == 0) { nfsd_file_flush(nf); |