Skip to contentSkip to conversation

FS-Cache: make check_consistency callback return int

PATCH In review Yan, Zheng 2 participants 2 messages May 20, 2016 – May 31, 2016

Subsystems (2)
lore
Share & tools
lore

Yan, Zheng

author
#0 lore raw

PATCH 1/1 FS-Cache: make check_consistency callback return int

__fscache_check_consistency() calls check_consistency() callback and return the callback's return value. But the return type of check_consistency() is bool. So __fscache_check_consistency() return 1 if the cache is inconsistent. This is inconsistent with the document.

---
 fs/cachefiles/interface.c     | 2 +-
 include/linux/fscache-cache.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/cachefiles/interface.c +1 -1
index 861d611..ce5f345 100644
@@ -380,7 +380,7 @@ static void cachefiles_sync_cache(struct fscache_cache *_cache)
  * check if the backing cache is updated to FS-Cache
  * - called by FS-Cache when evaluates if need to invalidate the cache
  */
-static bool cachefiles_check_consistency(struct fscache_operation *op)
+static int cachefiles_check_consistency(struct fscache_operation *op)
 {
 	struct cachefiles_object *object;
 	struct cachefiles_cache *cache;
include/linux/fscache-cache.h +1 -1
index 604e152..13ba552 100644
@@ -241,7 +241,7 @@ struct fscache_cache_ops {
 
 	/* check the consistency between the backing cache and the FS-Cache
 	 * cookie */
-	bool (*check_consistency)(struct fscache_operation *op);
+	int (*check_consistency)(struct fscache_operation *op);
 
 	/* store the updated auxiliary data on an object */
 	void (*update_object)(struct fscache_object *object);
Signature · 1 line
2.5.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Zheng

__fscache_check_consistency() calls check_consistency() callback and return the callback's return value. But the return type of check_consistency() is bool. So __fscache_check_consistency() return 1 if the cache is inconsistent. This is inconsistent with the document.