From: J. Bruce Fields Date: Thu, 19 Jul 2007 08:49:19 +0000 (-0700) Subject: nfsd: remove unnecessary NULL checks from nfsd_cross_mnt X-Git-Tag: v2.6.23-rc1~343 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5d3dbbeaf56d0365ac6b5c0a0da0bd31cc4781e1;p=linux-2.6-omap-h63xx.git 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" Acked-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index b8da5ddb3a0..5c97d0ea9e2 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);