Skip to content

Commit 08af54b

Browse files
committed
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/[email protected]/T/#mf1855552570cf9a9c80d1e49d91438cd9085aada Signed-off-by: Chuck Lever <[email protected]> Reviewed-by: Jeff Layton <[email protected]>
1 parent 043862b commit 08af54b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/nfsd/filecache.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ nfsd_file_put_noref(struct nfsd_file *nf)
302302
void
303303
nfsd_file_put(struct nfsd_file *nf)
304304
{
305+
might_sleep();
306+
305307
set_bit(NFSD_FILE_REFERENCED, &nf->nf_flags);
306308
if (test_bit(NFSD_FILE_HASHED, &nf->nf_flags) == 0) {
307309
nfsd_file_flush(nf);

0 commit comments

Comments
 (0)