Skip to content

Commit

Permalink
FS-Cache: make check_consistency callback return int
Browse files Browse the repository at this point in the history
__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.

Signed-off-by: Yan, Zheng <[email protected]>
Acked-by: David Howells <[email protected]>
  • Loading branch information
ukernel authored and idryomov committed Jun 1, 2016
1 parent d213845 commit 480ce08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/cachefiles/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/fscache-cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 480ce08

Please sign in to comment.