diff options
| author | Jeff Layton <[email protected]> | 2019-08-18 18:18:44 +0000 |
|---|---|---|
| committer | J. Bruce Fields <[email protected]> | 2019-08-19 15:00:39 +0000 |
| commit | f69d6d8eef7807f8d937b81da24bebd2e926e4d2 (patch) | |
| tree | 32597d19a96925f26e143ec5fff212d0e89e3e2b /net/sunrpc/cache.c | |
| parent | svcrdma: Use llist for managing cache of recv_ctxts (diff) | |
| download | kernel-f69d6d8eef7807f8d937b81da24bebd2e926e4d2.tar.gz kernel-f69d6d8eef7807f8d937b81da24bebd2e926e4d2.zip | |
sunrpc: add a new cache_detail operation for when a cache is flushed
When the exports table is changed, exportfs will usually write a new
time to the "flush" file in the nfsd.export cache procfile. This tells
the kernel to flush any entries that are older than that value.
This gives us a mechanism to tell whether an unexport might have
occurred. Add a new ->flush cache_detail operation that is called after
flushing the cache whenever someone writes to a "flush" file.
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Diffstat (limited to 'net/sunrpc/cache.c')
| -rw-r--r-- | net/sunrpc/cache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index a6a6190ad37a..a349094f6fb7 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1524,6 +1524,9 @@ static ssize_t write_flush(struct file *file, const char __user *buf, cd->nextcheck = now; cache_flush(); + if (cd->flush) + cd->flush(); + *ppos += count; return count; } |
