]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: make sure readdir reply include Fs cap for directory
authorYan, Zheng <zyan@redhat.com>
Wed, 25 Mar 2015 07:40:05 +0000 (15:40 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 25 Mar 2015 10:20:38 +0000 (18:20 +0800)
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>
src/mds/Locker.cc

index 1744514662b58e1565d4a92688709690e91c050a..97b1583369cd90f3e886dd3106b38e91652f2c14 100644 (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);