author: David Howells <dhowells@redhat.com> 2015-02-25 14:07:25 +0000
committer: David Howells <dhowells@redhat.com> 2015-04-02 14:28:53 +0100
commit: 73c04a47bf79770fbe7f3cf515f5831fccab88ee
parent: 03cdd0e4b9a98ae995b81cd8f58e992ec3f44ae2
Commit Summary:
Diffstat:
1 file changed, 7 insertions, 0 deletions
diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c
index 9761df4fc2ab..b6bf5f399d70 100644
--- a/fs/fscache/operation.c
+++ b/fs/fscache/operation.c
@@ -365,6 +365,13 @@ int fscache_cancel_op(struct fscache_operation *op,
wake_up_bit(&op->flags, FSCACHE_OP_WAITING);
ret = 0;
} else if (op->state == FSCACHE_OP_ST_IN_PROGRESS && cancel_in_progress_op) {
+ ASSERTCMP(object->n_in_progress, >, 0);
+ if (test_bit(FSCACHE_OP_EXCLUSIVE, &op->flags))
+ object->n_exclusive--;
+ object->n_in_progress--;
+ if (object->n_in_progress == 0)
+ fscache_start_operations(object);
+
fscache_stat(&fscache_n_op_cancelled);
if (do_cancel)
do_cancel(op);