Commit dc32464a authored by Al Viro's avatar Al Viro

ceph_wait_on_conflict_unlink(): grab reference before dropping ->d_lock

Use of dget() after we'd dropped ->d_lock is too late - dentry might
be gone by that point.
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 1939316b
......@@ -861,8 +861,8 @@ int ceph_wait_on_conflict_unlink(struct dentry *dentry)
if (!d_same_name(udentry, pdentry, &dname))
goto next;
found = dget_dlock(udentry);
spin_unlock(&udentry->d_lock);
found = dget(udentry);
break;
next:
spin_unlock(&udentry->d_lock);
......
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