diff options
author | Yan, Zheng <zyan@redhat.com> | 2019-05-11 17:27:59 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-03-30 12:42:40 +0200 |
commit | 525d15e8e5ad770d17681d6f9f1513faa361017c (patch) | |
tree | 4cde0c589410486f12369939801eeec728b5555e /fs/ceph/super.h | |
parent | f85122afeb230b4ad0b90ac40aba0fe6532baeea (diff) |
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>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 2eee34b9ac71..37dc1ac8f6c3 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -675,17 +675,7 @@ extern int ceph_caps_revoking(struct ceph_inode_info *ci, int mask); extern int __ceph_caps_used(struct ceph_inode_info *ci); extern int __ceph_caps_file_wanted(struct ceph_inode_info *ci); - -/* - * wanted, by virtue of open file modes AND cap refs (buffered/cached data) - */ -static inline int __ceph_caps_wanted(struct ceph_inode_info *ci) -{ - int w = __ceph_caps_file_wanted(ci) | __ceph_caps_used(ci); - if (w & CEPH_CAP_FILE_BUFFER) - w |= CEPH_CAP_FILE_EXCL; /* we want EXCL if dirty data */ - return w; -} +extern int __ceph_caps_wanted(struct ceph_inode_info *ci); /* what the mds thinks we want */ extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci, bool check); |