diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-05-10 15:07:32 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-14 20:30:26 -0400 |
commit | 2311b9439ce8c525f3f8f821fc2ca9a541f673a5 (patch) | |
tree | 6306764554cc50faf435297e190d3b38f1a39044 /fs/nfs/fscache.c | |
parent | bae36241be7fab16b2e987d31b6e6bd4456ac188 (diff) |
NFS: Don't pass mount data to nfs_fscache_get_super_cookie()
I intend on creating a single nfs_fs_mount() function used by all our
mount paths. To avoid checking between new mounts and clone mounts, I
instead pass both structures to a new function in super.c that finds the
cache key and then looks up the super cookie.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/fscache.c')
-rw-r--r-- | fs/nfs/fscache.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index ae65c16b3670..c817787fbdb4 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c | |||
@@ -64,23 +64,12 @@ void nfs_fscache_release_client_cookie(struct nfs_client *clp) | |||
64 | * either by the 'fsc=xxx' option to mount, or by inheriting it from the parent | 64 | * either by the 'fsc=xxx' option to mount, or by inheriting it from the parent |
65 | * superblock across an automount point of some nature. | 65 | * superblock across an automount point of some nature. |
66 | */ | 66 | */ |
67 | void nfs_fscache_get_super_cookie(struct super_block *sb, const char *uniq, | 67 | void nfs_fscache_get_super_cookie(struct super_block *sb, const char *uniq, int ulen) |
68 | struct nfs_clone_mount *mntdata) | ||
69 | { | 68 | { |
70 | struct nfs_fscache_key *key, *xkey; | 69 | struct nfs_fscache_key *key, *xkey; |
71 | struct nfs_server *nfss = NFS_SB(sb); | 70 | struct nfs_server *nfss = NFS_SB(sb); |
72 | struct rb_node **p, *parent; | 71 | struct rb_node **p, *parent; |
73 | int diff, ulen; | 72 | int diff; |
74 | |||
75 | if (uniq) { | ||
76 | ulen = strlen(uniq); | ||
77 | } else if (mntdata) { | ||
78 | struct nfs_server *mnt_s = NFS_SB(mntdata->sb); | ||
79 | if (mnt_s->fscache_key) { | ||
80 | uniq = mnt_s->fscache_key->key.uniquifier; | ||
81 | ulen = mnt_s->fscache_key->key.uniq_len; | ||
82 | } | ||
83 | } | ||
84 | 73 | ||
85 | if (!uniq) { | 74 | if (!uniq) { |
86 | uniq = ""; | 75 | uniq = ""; |