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 <zyan@redhat.com>
This commit is contained in:
Yan, Zheng 2015-03-25 15:40:05 +08:00
parent 2c181c2ae8
commit 73e3358000

View File

@ -1161,7 +1161,7 @@ bool Locker::_rdlock_kick(SimpleLock *lock, bool as_anon)
CInode *in = static_cast<CInode*>(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);