diff options
author | Zhang Zhuoyu <zhangzhuoyu@cmss.chinamobile.com> | 2016-03-25 05:18:39 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-25 19:15:39 -0400 |
commit | 3b33f692c84c28cc8178aaeeb9264d82b48787f1 (patch) | |
tree | c2d56a816c39928e5c82b6fde4d233b800f2a8fb /fs | |
parent | 224a7542b8fdde3cc7c600f8b0870c5541a9f678 (diff) |
ceph: make logical calculation functions return bool
This patch makes serverl logical caculation functions return bool to
improve readability due to these particular functions only using 0/1
as their return value.
No functional change.
Signed-off-by: Zhang Zhuoyu <zhangzhuoyu@cmss.chinamobile.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/cache.c | 2 | ||||
-rw-r--r-- | fs/ceph/dir.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/cache.c b/fs/ceph/cache.c index a351480dbabc..c052b5bf219b 100644 --- a/fs/ceph/cache.c +++ b/fs/ceph/cache.c | |||
@@ -236,7 +236,7 @@ static void ceph_vfs_readpage_complete_unlock(struct page *page, void *data, int | |||
236 | unlock_page(page); | 236 | unlock_page(page); |
237 | } | 237 | } |
238 | 238 | ||
239 | static inline int cache_valid(struct ceph_inode_info *ci) | 239 | static inline bool cache_valid(struct ceph_inode_info *ci) |
240 | { | 240 | { |
241 | return ((ceph_caps_issued(ci) & CEPH_CAP_FILE_CACHE) && | 241 | return ((ceph_caps_issued(ci) & CEPH_CAP_FILE_CACHE) && |
242 | (ci->i_fscache_gen == ci->i_rdcache_gen)); | 242 | (ci->i_fscache_gen == ci->i_rdcache_gen)); |
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 4850c3624a87..f6279a1bd6ec 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -710,7 +710,7 @@ struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, | |||
710 | return dentry; | 710 | return dentry; |
711 | } | 711 | } |
712 | 712 | ||
713 | static int is_root_ceph_dentry(struct inode *inode, struct dentry *dentry) | 713 | static bool is_root_ceph_dentry(struct inode *inode, struct dentry *dentry) |
714 | { | 714 | { |
715 | return ceph_ino(inode) == CEPH_INO_ROOT && | 715 | return ceph_ino(inode) == CEPH_INO_ROOT && |
716 | strncmp(dentry->d_name.name, ".ceph", 5) == 0; | 716 | strncmp(dentry->d_name.name, ".ceph", 5) == 0; |