summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/fscache/operation.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c
index e30c5975ea58..8d265790374c 100644
--- a/fs/fscache/operation.c
+++ b/fs/fscache/operation.c
@@ -70,7 +70,8 @@ void fscache_enqueue_operation(struct fscache_operation *op)
70 ASSERT(op->processor != NULL); 70 ASSERT(op->processor != NULL);
71 ASSERT(fscache_object_is_available(op->object)); 71 ASSERT(fscache_object_is_available(op->object));
72 ASSERTCMP(atomic_read(&op->usage), >, 0); 72 ASSERTCMP(atomic_read(&op->usage), >, 0);
73 ASSERTCMP(op->state, ==, FSCACHE_OP_ST_IN_PROGRESS); 73 ASSERTIFCMP(op->state != FSCACHE_OP_ST_IN_PROGRESS,
74 op->state, ==, FSCACHE_OP_ST_CANCELLED);
74 75
75 fscache_stat(&fscache_n_op_enqueue); 76 fscache_stat(&fscache_n_op_enqueue);
76 switch (op->flags & FSCACHE_OP_TYPE) { 77 switch (op->flags & FSCACHE_OP_TYPE) {
@@ -499,7 +500,8 @@ void fscache_put_operation(struct fscache_operation *op)
499 struct fscache_cache *cache; 500 struct fscache_cache *cache;
500 501
501 _enter("{OBJ%x OP%x,%d}", 502 _enter("{OBJ%x OP%x,%d}",
502 op->object->debug_id, op->debug_id, atomic_read(&op->usage)); 503 op->object ? op->object->debug_id : 0,
504 op->debug_id, atomic_read(&op->usage));
503 505
504 ASSERTCMP(atomic_read(&op->usage), >, 0); 506 ASSERTCMP(atomic_read(&op->usage), >, 0);
505 507