]> Git Repo - J-linux.git/commitdiff
NFSD: nfsd_file_put() can sleep
authorChuck Lever <[email protected]>
Wed, 11 May 2022 17:02:21 +0000 (13:02 -0400)
committerChuck Lever <[email protected]>
Thu, 26 May 2022 14:50:51 +0000 (10:50 -0400)
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/[email protected]/T/#mf1855552570cf9a9c80d1e49d91438cd9085aada
Signed-off-by: Chuck Lever <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
fs/nfsd/filecache.c

index a7e3a443a2cbffaa3dbd6cdd6b59b6b041c3762b..d32fcd8ad457db258d10d5cc9da7e0c5b83605a1 100644 (file)
@@ -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);
This page took 0.053662 seconds and 4 git commands to generate.