Skip to content

Commit 1575161

Browse files
DaveWysochanskiRHdhowells
authored andcommitted
NFS: Fix fscache super_cookie allocation
Commit f2aedb7 ("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: f2aedb7 ("NFS: Add fs_context support.") Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
1 parent d9bfced commit 1575161

2 files changed

Lines changed: 0 additions & 3 deletions

File tree

‎fs/nfs/fscache.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ void nfs_fscache_get_super_cookie(struct super_block *sb, const char *uniq, int
118118

119119
nfss->fscache_key = NULL;
120120
nfss->fscache = NULL;
121-
if (!(nfss->options & NFS_OPTION_FSCACHE))
122-
return;
123121
if (!uniq) {
124122
uniq = "";
125123
ulen = 1;

‎fs/nfs/super.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,6 @@ static void nfs_get_cache_cookie(struct super_block *sb,
11891189
uniq = ctx->fscache_uniq;
11901190
ulen = strlen(ctx->fscache_uniq);
11911191
}
1192-
return;
11931192
}
11941193

11951194
nfs_fscache_get_super_cookie(sb, uniq, ulen);

0 commit comments

Comments
 (0)