Merge tag 'trace-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[sfrench/cifs-2.6.git] / include / linux / fscache-cache.h
index 34cf0fdd7dc76ac0ac754ad9af36d8a505aa9795..610815e3f1aaeb02c0a713128fd687a8adc78b5b 100644 (file)
@@ -196,8 +196,7 @@ static inline void fscache_enqueue_retrieval(struct fscache_retrieval *op)
 static inline void fscache_retrieval_complete(struct fscache_retrieval *op,
                                              int n_pages)
 {
-       atomic_sub(n_pages, &op->n_pages);
-       if (atomic_read(&op->n_pages) <= 0)
+       if (atomic_sub_return_relaxed(n_pages, &op->n_pages) <= 0)
                fscache_op_complete(&op->op, false);
 }