summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2024-07-23 18:08:08 +0200
committerIlya Dryomov <idryomov@gmail.com>2024-07-25 12:18:29 +0200
commit3ceccb14f5576e02b81cc8b105ab81f224bd87f6 (patch)
tree6a1f2f51a0ac2adea4254265f1eedb525cb9e320 /fs
parent2237ceb71f89837ac47c5dce2aaa2c2b3a337a3c (diff)
rbd: don't assume rbd_is_lock_owner() for exclusive mappings
Expanding on the previous commit, assuming that rbd_is_lock_owner() always returns true (i.e. that we are either in RBD_LOCK_STATE_LOCKED or RBD_LOCK_STATE_QUIESCING) if the mapping is exclusive is wrong too. In case ceph_cls_set_cookie() fails, the lock would be temporarily released even if the mapping is exclusive, meaning that we can end up even in RBD_LOCK_STATE_UNLOCKED. IOW, exclusive mappings are really "just" about disabling automatic lock transitions (as documented in the man page), not about grabbing the lock and holding on to it whatever it takes. Cc: stable@vger.kernel.org Fixes: 637cd060537d ("rbd: new exclusive lock wait/wake code") Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions