From: Yan, Zheng Date: Wed, 25 Mar 2015 07:40:05 +0000 (+0800) Subject: mds: make sure readdir reply include Fs cap for directory X-Git-Tag: v9.0.0~75^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=73e33580000c79e3660514d98ce15a656d26ed8f;p=ceph.git mds: make sure readdir reply include Fs cap for directory filelock in LOCK_XSYN state does not allow Fs cap. so client can't mark directory as complete when handling the readdir reply. Signed-off-by: Yan, Zheng --- diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 1744514662b5..97b1583369cd 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -1161,7 +1161,7 @@ bool Locker::_rdlock_kick(SimpleLock *lock, bool as_anon) CInode *in = static_cast(lock->get_parent()); if (lock->get_state() == LOCK_EXCL && in->get_target_loner() >= 0 && - !as_anon) // as_anon => caller wants SYNC, not XSYN + !in->is_dir() && !as_anon) // as_anon => caller wants SYNC, not XSYN file_xsyn(lock); else simple_sync(lock);