Skip to content

Commit

Permalink
Merge pull request #11852: jewel: Exclusive lock improperly initializ…
Browse files Browse the repository at this point in the history
…ed on read-only image when using snap_set API

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Nov 9, 2016
2 parents 30d9864 + 20ae76b commit 804fdbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librbd/image/SetSnapRequest.cc
Expand Up @@ -56,7 +56,8 @@ void SetSnapRequest<I>::send_init_exclusive_lock() {
}
}

if (!m_image_ctx.test_features(RBD_FEATURE_EXCLUSIVE_LOCK)) {
if (m_image_ctx.read_only ||
!m_image_ctx.test_features(RBD_FEATURE_EXCLUSIVE_LOCK)) {
int r = 0;
if (send_refresh_parent(&r) != nullptr) {
send_complete();
Expand Down

0 comments on commit 804fdbf

Please sign in to comment.