
From: NeilBrown <neilb@cse.unsw.edu.au>

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.



---

 25-akpm/fs/nfsd/vfs.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/nfsd/vfs.c~nfsd-03-follow_up-fix fs/nfsd/vfs.c
--- 25/fs/nfsd/vfs.c~nfsd-03-follow_up-fix	Thu Jan 15 17:43:52 2004
+++ 25-akpm/fs/nfsd/vfs.c	Thu Jan 15 17:43:52 2004
@@ -161,7 +161,7 @@ nfsd_lookup(struct svc_rqst *rqstp, stru
 			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);

_
