diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2023-09-15 03:55:29 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2023-10-28 02:14:38 +0200 |
commit | dc32464a5fe4946fe1a4d8f8e29961dc411933c5 (patch) | |
tree | 987f42313d23e5a39c4b60ed5d7a31537e901bc0 /fs/ceph/mds_client.c | |
parent | io_uring: kiocb_done() should *not* trust ->ki_pos if ->{read,write}_iter() f... (diff) | |
download | linux-dc32464a5fe4946fe1a4d8f8e29961dc411933c5.tar.xz linux-dc32464a5fe4946fe1a4d8f8e29961dc411933c5.zip |
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/mds_client.c')
-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); |