diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2023-09-14 21:55:29 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2023-10-27 20:14:38 -0400 |
commit | dc32464a5fe4946fe1a4d8f8e29961dc411933c5 (patch) | |
tree | 987f42313d23e5a39c4b60ed5d7a31537e901bc0 /fs/ceph | |
parent | 1939316bf988f3e49a07d9c4dd6f660bf4daa53d (diff) |
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/mds_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 615db141b6c4..293b93182955 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -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); |