]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
locks: create a new notifier chain for lease attempts
authorJeff Layton <jlayton@poochiereds.net>
Tue, 20 Oct 2015 17:33:40 +0000 (13:33 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 23 Oct 2015 19:57:37 +0000 (15:57 -0400)
commit4ddbc7faae0ca62996d9d4b79c36570df2289461
tree6410bc9dab2d34e13c0327d800f4e4a453213199
parent58dba6cdb9c16b6e86a0f33b1ce888ff0172155d
locks: create a new notifier chain for lease attempts

With the new file caching infrastructure in nfsd, we can end up holding
files open for an indefinite period of time, even when they are still
idle. This may prevent the kernel from handing out leases on the file,
which is something we don't want to block.

Fix this by running a SRCU notifier call chain whenever any lease
attempt is made. nfsd can then purge the nfsd_file cache of any entries
associated with that inode, and use the fput_global infrastructure to
make sure the final __fput is done.

Since SRCU is only conditionally compiled in, we must only define the
new chain if it's enabled, and users of the chain must ensure that
SRCU is enabled.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/locks.c
include/linux/fs.h