Skip to content

Commit dc32464

Browse files
author
Al Viro
committed
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: Jeff Layton <jlayton@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 1939316 commit dc32464

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ceph/mds_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,8 @@ int ceph_wait_on_conflict_unlink(struct dentry *dentry)
861861
if (!d_same_name(udentry, pdentry, &dname))
862862
goto next;
863863

864+
found = dget_dlock(udentry);
864865
spin_unlock(&udentry->d_lock);
865-
found = dget(udentry);
866866
break;
867867
next:
868868
spin_unlock(&udentry->d_lock);

0 commit comments

Comments
 (0)