summaryrefslogtreecommitdiffstats
path: root/fs/nfs/fscache.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2020-04-15 16:14:42 -0400
committerDavid Howells <dhowells@redhat.com>2020-05-08 22:20:24 +0100
commit15751612734ca0c419ac43ce986c9badcb5e2829 (patch)
tree49eef1e396be2573d3a075275d393d3f6deecb12 /fs/nfs/fscache.c
parentd9bfced1fbcb35b28d8fbed4e785d2807055ed2b (diff)
downloadlinux-15751612734ca0c419ac43ce986c9badcb5e2829.tar.gz
linux-15751612734ca0c419ac43ce986c9badcb5e2829.tar.bz2
linux-15751612734ca0c419ac43ce986c9badcb5e2829.zip
NFS: Fix fscache super_cookie allocation
Commit f2aedb713c28 ("NFS: Add fs_context support.") reworked NFS mount code paths for fs_context support which included super_block initialization. In the process there was an extra return left in the code and so we never call nfs_fscache_get_super_cookie even if 'fsc' is given on as mount option. In addition, there is an extra check inside nfs_fscache_get_super_cookie for the NFS_OPTION_FSCACHE which is unnecessary since the only caller nfs_get_cache_cookie checks this flag. Fixes: f2aedb713c28 ("NFS: Add fs_context support.") Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/nfs/fscache.c')
-rw-r--r--fs/nfs/fscache.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
index 8eff1fd806b1..f51718415606 100644
--- a/fs/nfs/fscache.c
+++ b/fs/nfs/fscache.c
@@ -118,8 +118,6 @@ void nfs_fscache_get_super_cookie(struct super_block *sb, const char *uniq, int
nfss->fscache_key = NULL;
nfss->fscache = NULL;
- if (!(nfss->options & NFS_OPTION_FSCACHE))
- return;
if (!uniq) {
uniq = "";
ulen = 1;