From 73e33580000c79e3660514d98ce15a656d26ed8f Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Wed, 25 Mar 2015 15:40:05 +0800 Subject: [PATCH] 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 --- src/mds/Locker.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 1744514662b..97b1583369c 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);