summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorMax Kellermann <max.kellermann@ionos.com>2026-07-08 22:40:22 +0200
committerIlya Dryomov <idryomov@gmail.com>2026-08-26 19:57:28 +0200
commit1319b97dfe9eaa0e15132af95efe6513718f9123 (patch)
tree8ba68642703d6b80bf9efe12043fd0932902e880 /scripts/const_structs.checkpatch
parentee611a7509554c4ca1f54f6aefe592fb1df7ea70 (diff)
downloadlinux-1319b97dfe9eaa0e15132af95efe6513718f9123.tar.gz
linux-1319b97dfe9eaa0e15132af95efe6513718f9123.zip
ceph: drop mdsc->mutex before decoding the MDS reply
handle_reply() held `mdsc->mutex` across parse_reply_info(), i.e. across the full decode of the reply message. For large replies (a big readdir allocates and parses many dir_entries), this can take a while and blocks ceph_mdsc_submit_request() calls meanwhile. The decode does not need `mdsc->mutex`: parse_reply_info() mostly fills the request's `r_reply_info`. Create replies may also add delegated inode numbers to the session xarray, but that xarray is protected by its own lock and is not serialized by `mdsc->mutex` today. By the time we reach parse_reply_info(), all `mdsc->mutex`-protected state has already been updated under the lock (the request has either been unregistered (safe reply) or added to the session's unsafe list (unsafe reply)) and the request is pinned by the reference taken in lookup_get_request(). Drop `mdsc->mutex` before calling parse_reply_info() so reply decoding no longer blocks request submission. This only widens the existing unlocked window that already covers the heavier ceph_fill_trace() / ceph_readdir_prepopulate() processing, so no new races are introduced. Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Reviewed-by: Xiubo Li <xiubo.li@clyso.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions