]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: ceph_kick_flushing_caps needs the s_mutex
authorJeff Layton <jlayton@kernel.org>
Fri, 3 Apr 2020 17:09:07 +0000 (13:09 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 1 Jun 2020 11:22:53 +0000 (13:22 +0200)
commitb4098e19fa3e2b6e7fb7b320db5a51062f84ad9e
tree3ff8e570a00668a6e17a0f27d3b5ced8a4dd4089
parentb119a93ae1740a73a7e33128e8100f3e24eefcd8
ceph: ceph_kick_flushing_caps needs the s_mutex

The mdsc->cap_dirty_lock is not held while walking the list in
ceph_kick_flushing_caps, which is not safe.

ceph_early_kick_flushing_caps does something similar, but the
s_mutex is held while it's called and I think that guards against
changes to the list.

Ensure we hold the s_mutex when calling ceph_kick_flushing_caps,
and add some clarifying comments.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
fs/ceph/super.h