From 5e113224c17e2fb156b785ddbbc48a0209fddb0c Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Mon, 2 Sep 2019 13:02:55 -0400 Subject: nfsd: nfsd_file cache entries should be per net namespace Ensure that we can safely clear out the file cache entries when the nfs server is shut down on a container. Otherwise, the file cache may end up pinning the mounts. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields --- fs/nfsd/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/nfsd/export.c') diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 052fac64b578..15422c951fd1 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -240,7 +240,7 @@ static void expkey_flush(void) * destroyed while we're in the middle of flushing. */ mutex_lock(&nfsd_mutex); - nfsd_file_cache_purge(); + nfsd_file_cache_purge(current->nsproxy->net_ns); mutex_unlock(&nfsd_mutex); } -- cgit v1.2.3