ceph: stop on-going cached readdir if mds revokes FILE_SHARED cap
authorYan, Zheng <zyan@redhat.com>
Wed, 6 Sep 2017 02:15:16 +0000 (10:15 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 6 Sep 2017 17:57:00 +0000 (19:57 +0200)
commit15b51bd6badbb373c723aa019cf530c8263efd7e
treee5e9c111c77b05319364f241440b2d5edee77923
parentf275635ee0b6641151dfaf07b901d7c8d4d8e987
ceph: stop on-going cached readdir if mds revokes FILE_SHARED cap

If directory's FILE_SHARED cap get revoked, dentry in the directory
can get spliced into other directory (Eg, other client move the
dentry into directory B, then we do readdir on directory B). So we
should stop on-going cached readdir. this can be achieved by marking
dir not complete, because __dcache_readdir() checks dir completeness
before emitting each dentry.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c