diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-04-10 11:57:07 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-04-12 19:34:21 -0400 |
commit | 160bc1604f8a33202578846c9a63e2a61105a4b7 (patch) | |
tree | 55460a664616db57b89aaea7ff64bac69b7e4d97 /fs | |
parent | 6faf9a54156fb4d01d73344cc90cb52dda074433 (diff) |
NFS: Remove dead code from nfs_fs_mount()
In fs/nfs/super.c::nfs_fs_mount() we test for a NULL 'data':
...
if (data == NULL || mntfh == NULL)
goto out_free_fh;
...
and then further down in the function we test 'data' again:
...
nfs_fscache_get_super_cookie(
s, data ? data->fscache_uniq : NULL, NULL);
...
this second check is just dead code since there is no way 'data' could
possibly be NULL here.
We also rely on a non-NULL 'data' in more than one location between these
two tests, further proving the point that the second test is bogus.
This patch removes the dead code.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 2b8e9a5e366a..685a8a7bd17b 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2235,8 +2235,7 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type, | |||
2235 | if (!s->s_root) { | 2235 | if (!s->s_root) { |
2236 | /* initial superblock/root creation */ | 2236 | /* initial superblock/root creation */ |
2237 | nfs_fill_super(s, data); | 2237 | nfs_fill_super(s, data); |
2238 | nfs_fscache_get_super_cookie( | 2238 | nfs_fscache_get_super_cookie(s, data->fscache_uniq, NULL); |
2239 | s, data ? data->fscache_uniq : NULL, NULL); | ||
2240 | } | 2239 | } |
2241 | 2240 | ||
2242 | mntroot = nfs_get_root(s, mntfh, dev_name); | 2241 | mntroot = nfs_get_root(s, mntfh, dev_name); |