ceph: check inode type for CEPH_CAP_FILE_{CACHE,RD,REXTEND,LAZYIO}
These bits will have new meaning for directory inodes. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
@@ -1776,7 +1776,8 @@ static int trim_caps_cb(struct inode *inode, struct ceph_cap *cap, void *arg)
|
||||
}
|
||||
/* The inode has cached pages, but it's no longer used.
|
||||
* we can safely drop it */
|
||||
if (wanted == 0 && used == CEPH_CAP_FILE_CACHE &&
|
||||
if (S_ISREG(inode->i_mode) &&
|
||||
wanted == 0 && used == CEPH_CAP_FILE_CACHE &&
|
||||
!(oissued & CEPH_CAP_FILE_CACHE)) {
|
||||
used = 0;
|
||||
oissued = 0;
|
||||
|
Reference in New Issue
Block a user