]> git.karo-electronics.de Git - linux-beck.git/commit
NFS: Remove dead code from nfs_fs_mount()
authorJesper Juhl <jj@chaosbits.net>
Sun, 10 Apr 2011 15:57:07 +0000 (17:57 +0200)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 12 Apr 2011 23:34:21 +0000 (19:34 -0400)
commit160bc1604f8a33202578846c9a63e2a61105a4b7
tree55460a664616db57b89aaea7ff64bac69b7e4d97
parent6faf9a54156fb4d01d73344cc90cb52dda074433
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>
fs/nfs/super.c