]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ceph: clear s_cap_reconnect when ceph_pagelist_encode_32() fails
authorMax Kellermann <max.kellermann@ionos.com>
Mon, 30 Mar 2026 08:43:19 +0000 (10:43 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 21 Apr 2026 23:40:23 +0000 (01:40 +0200)
commitcc5643095419d45927a1dee9cb3da7c2f9e779f6
treeeb8bcd2d7317cff84b555ef36af43d55a3f16f3d
parent803447f93d75ab6e40c85e6d12b5630d281d70d6
ceph: clear s_cap_reconnect when ceph_pagelist_encode_32() fails

This MDS reconnect error path leaves s_cap_reconnect set.
send_mds_reconnect() sets the bit at the beginning of the reconnect,
but the first failing operation after that, ceph_pagelist_encode_32(),
can jump to `fail:` without clearing it.

__ceph_remove_cap() consults that flag to decide whether cap releases
should be queued. A reconnect-preparation failure therefore leaves the
session in reconnect mode from the cap-release path's point of view
and can strand release work until some later state transition repairs
it.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c