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

[PATCH] exp_parent locking fixes

From: Neil Brown and myself.

Don't do dput() inside read_lock().  It can sleep.
parent ca88b8e8
......@@ -543,13 +543,13 @@ exp_parent(svc_client *clp, struct vfsmount *mnt, struct dentry *dentry,
dget(dentry);
exp = exp_get_by_name(clp, mnt, dentry, reqp);
while (exp == NULL && dentry != dentry->d_parent) {
while (exp == NULL && !IS_ROOT(dentry)) {
struct dentry *parent;
read_lock(&dparent_lock);
parent = dget(dentry->d_parent);
read_unlock(&dparent_lock);
dput(dentry);
dentry = parent;
read_unlock(&dparent_lock);
exp = exp_get_by_name(clp, mnt, dentry, reqp);
}
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