summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-22 17:28:03 -0700
committerSage Weil <sage@inktank.com>2013-07-22 17:28:03 -0700
commit450d42bf9247daf295c4a3bb5faa744048c3df99 (patch)
treeb8a8e8541e98e8b9995ee81e56b8099b2f35e53b
parentcc4be1de9aa9ef17daa0cae6cc85441c8276e651 (diff)
downloadceph-450d42bf9247daf295c4a3bb5faa744048c3df99.tar.gz
librbd: allow recursive lock of md_lock
This is necessary for opening the parent (if any). Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/librbd/internal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc
index db7d55d82ff..ca980e12f37 100644
--- a/src/librbd/internal.cc
+++ b/src/librbd/internal.cc
@@ -2052,7 +2052,7 @@ reprotect_and_return_err:
}
}
- ictx->md_lock.get_write();
+ ictx->md_lock.get_write(true); // may recursively open parent
r = ictx_refresh(ictx);
ictx->md_lock.put_write();
if (r < 0)