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 <dhowells@redhat.com> Tested-By: Milosz Tanski <milosz@adfin.com> Acked-by: Jeff Layton <jlayton@redhat.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user