diff options
author | Sage Weil <sage@newdream.net> | 2008-06-06 01:19:23 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2008-06-06 01:19:23 +0200 |
commit | cc0e252768153f70f051c8a7eec3c2327c6c1f6b (patch) | |
tree | 9e37700dc639b8e09301c9a325c202cbd04fe4e7 /src/mds/FileLock.h | |
parent | mds: fix ScatterLock can_wrlock (diff) | |
download | ceph-cc0e252768153f70f051c8a7eec3c2327c6c1f6b.tar.xz ceph-cc0e252768153f70f051c8a7eec3c2327c6c1f6b.zip |
mds: fix FileLock can_wrlock
Diffstat (limited to 'src/mds/FileLock.h')
-rw-r--r-- | src/mds/FileLock.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mds/FileLock.h b/src/mds/FileLock.h index 5454f5cddc1..82c29d294f8 100644 --- a/src/mds/FileLock.h +++ b/src/mds/FileLock.h @@ -164,10 +164,11 @@ class FileLock : public SimpleLock { // wrlock bool can_wrlock() { return - state == LOCK_LOCK || state == LOCK_GLOCKM || state == LOCK_GLOCKL || - state == LOCK_MIXED || state == LOCK_GMIXEDL || - state == LOCK_LONER || state == LOCK_GLONERM || - state == LOCK_GSYNCM || state == LOCK_GSYNCL; + parent->is_auth() && + (state == LOCK_LOCK || state == LOCK_GLOCKM || state == LOCK_GLOCKL || + state == LOCK_MIXED || state == LOCK_GMIXEDL || + state == LOCK_LONER || state == LOCK_GLONERM || + state == LOCK_GSYNCM || state == LOCK_GSYNCL); } void get_wrlock(bool force) { assert(force || can_wrlock()); |