]> git.baikalelectronics.ru Git - kernel.git/commit
locks: create a new notifier chain for lease attempts
authorJeff Layton <jeff.layton@primarydata.com>
Sun, 18 Aug 2019 18:18:45 +0000 (14:18 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 19 Aug 2019 15:00:39 +0000 (11:00 -0400)
commit38b8e27318382d5bfbf37f79b5a8c46a3f32ff57
treedb96f78e192180c2b3460c426e2f7864e802a9d2
parent1363dd23b81ed6e0d85e0cc2faf562cca815e5a9
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 on any
lease attempt. nfsd can then purge the cache for that inode before
returning.

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: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/locks.c
include/linux/fs.h