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/operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/fscache/operation.c') diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c index 762a9ec4ffa4..ccf02194e7a6 100644 --- a/fs/fscache/operation.c +++ b/fs/fscache/operation.c @@ -35,7 +35,7 @@ void fscache_enqueue_operation(struct fscache_operation *op) ASSERT(list_empty(&op->pend_link)); ASSERT(op->processor != NULL); - ASSERTCMP(op->object->state, >=, FSCACHE_OBJECT_AVAILABLE); + ASSERT(fscache_object_is_available(op->object)); ASSERTCMP(atomic_read(&op->usage), >, 0); ASSERTCMP(op->state, ==, FSCACHE_OP_ST_IN_PROGRESS); -- cgit