summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-07-19 10:49:19 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 19:04:52 +0200
commit5d3dbbeaf56d0365ac6b5c0a0da0bd31cc4781e1 (patch)
treeaa47031138ddb94f8a725ab525a46bffd466a479 /fs/nfsd/vfs.c
parentnfsd: return errors, not NULL, from export functions (diff)
downloadlinux-5d3dbbeaf56d0365ac6b5c0a0da0bd31cc4781e1.tar.xz
linux-5d3dbbeaf56d0365ac6b5c0a0da0bd31cc4781e1.zip
nfsd: remove unnecessary NULL checks from nfsd_cross_mnt
We can now assume that rqst_exp_get_by_name() does not return NULL; so clean up some unnecessary checks. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--fs/nfsd/vfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index b8da5ddb3a0a..5c97d0ea9e22 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -120,14 +120,14 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
mntput(mnt);
goto out;
}
- if (exp2 && ((exp->ex_flags & NFSEXP_CROSSMOUNT) || EX_NOHIDE(exp2))) {
+ if ((exp->ex_flags & NFSEXP_CROSSMOUNT) || EX_NOHIDE(exp2)) {
/* successfully crossed mount point */
exp_put(exp);
*expp = exp2;
dput(dentry);
*dpp = mounts;
} else {
- if (exp2) exp_put(exp2);
+ exp_put(exp2);
dput(mounts);
}
mntput(mnt);