From d1a8cd1a132b28110592be93fa79f33122b7d0fc Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 18 Jan 2004 18:56:51 -0800 Subject: [PATCH] [PATCH] kNFSd: Fix incorrect call for follow_up From: NeilBrown follow_up doesn't check that the passed dentry is at the root of the mounted file system, so we have to do that, to avoid calling follow_up too many times. --- fs/nfsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index ee48369a2836e..96cb2eed9c113 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -161,7 +161,7 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, struct dentry *dp; struct vfsmount *mnt = mntget(exp->ex_mnt); dentry = dget(dparent); - while(follow_up(&mnt, &dentry)) + while(dentry == mnt->mnt_root && follow_up(&mnt, &dentry)) ; dp = dget_parent(dentry); dput(dentry); -- 2.53.0