From 493f7bc11457bc1f6fbf25a4b2bdf215ebaf050f Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 10 May 2013 19:50:26 +0100 Subject: FS-Cache: Wrap checks on object state Wrap checks on object state (mostly outside of fs/fscache/object.c) with inline functions so that the mechanism can be replaced. Some of the state checks within object.c are left as-is as they will be replaced. Signed-off-by: David Howells Tested-By: Milosz Tanski Acked-by: Jeff Layton --- fs/fscache/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/fscache/cache.c') diff --git a/fs/fscache/cache.c b/fs/fscache/cache.c index b52aed1dca97..129ea537f023 100644 --- a/fs/fscache/cache.c +++ b/fs/fscache/cache.c @@ -115,7 +115,7 @@ struct fscache_cache *fscache_select_cache_for_object( struct fscache_object, cookie_link); cache = object->cache; - if (object->state >= FSCACHE_OBJECT_DYING || + if (fscache_object_is_dying(object) || test_bit(FSCACHE_IOERROR, &cache->flags)) cache = NULL; -- cgit