Commit d1a8cd1a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] kNFSd: Fix incorrect call for follow_up

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.
parent fd1b3e40
...@@ -161,7 +161,7 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, ...@@ -161,7 +161,7 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
struct dentry *dp; struct dentry *dp;
struct vfsmount *mnt = mntget(exp->ex_mnt); struct vfsmount *mnt = mntget(exp->ex_mnt);
dentry = dget(dparent); dentry = dget(dparent);
while(follow_up(&mnt, &dentry)) while(dentry == mnt->mnt_root && follow_up(&mnt, &dentry))
; ;
dp = dget_parent(dentry); dp = dget_parent(dentry);
dput(dentry); dput(dentry);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment