diff options
Diffstat (limited to 'fs/fscache')
-rw-r--r-- | fs/fscache/page.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/fscache/page.c b/fs/fscache/page.c index 780bac6ffde5..d479ab3c63e4 100644 --- a/fs/fscache/page.c +++ b/fs/fscache/page.c | |||
@@ -235,7 +235,7 @@ static void fscache_release_retrieval_op(struct fscache_operation *_op) | |||
235 | 235 | ||
236 | _enter("{OP%x}", op->op.debug_id); | 236 | _enter("{OP%x}", op->op.debug_id); |
237 | 237 | ||
238 | ASSERTCMP(op->n_pages, ==, 0); | 238 | ASSERTCMP(atomic_read(&op->n_pages), ==, 0); |
239 | 239 | ||
240 | fscache_hist(fscache_retrieval_histogram, op->start_time); | 240 | fscache_hist(fscache_retrieval_histogram, op->start_time); |
241 | if (op->context) | 241 | if (op->context) |
@@ -316,7 +316,7 @@ static void fscache_do_cancel_retrieval(struct fscache_operation *_op) | |||
316 | struct fscache_retrieval *op = | 316 | struct fscache_retrieval *op = |
317 | container_of(_op, struct fscache_retrieval, op); | 317 | container_of(_op, struct fscache_retrieval, op); |
318 | 318 | ||
319 | op->n_pages = 0; | 319 | atomic_set(&op->n_pages, 0); |
320 | } | 320 | } |
321 | 321 | ||
322 | /* | 322 | /* |
@@ -406,7 +406,7 @@ int __fscache_read_or_alloc_page(struct fscache_cookie *cookie, | |||
406 | _leave(" = -ENOMEM"); | 406 | _leave(" = -ENOMEM"); |
407 | return -ENOMEM; | 407 | return -ENOMEM; |
408 | } | 408 | } |
409 | op->n_pages = 1; | 409 | atomic_set(&op->n_pages, 1); |
410 | 410 | ||
411 | spin_lock(&cookie->lock); | 411 | spin_lock(&cookie->lock); |
412 | 412 | ||
@@ -533,7 +533,7 @@ int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie, | |||
533 | op = fscache_alloc_retrieval(cookie, mapping, end_io_func, context); | 533 | op = fscache_alloc_retrieval(cookie, mapping, end_io_func, context); |
534 | if (!op) | 534 | if (!op) |
535 | return -ENOMEM; | 535 | return -ENOMEM; |
536 | op->n_pages = *nr_pages; | 536 | atomic_set(&op->n_pages, *nr_pages); |
537 | 537 | ||
538 | spin_lock(&cookie->lock); | 538 | spin_lock(&cookie->lock); |
539 | 539 | ||
@@ -643,7 +643,7 @@ int __fscache_alloc_page(struct fscache_cookie *cookie, | |||
643 | op = fscache_alloc_retrieval(cookie, page->mapping, NULL, NULL); | 643 | op = fscache_alloc_retrieval(cookie, page->mapping, NULL, NULL); |
644 | if (!op) | 644 | if (!op) |
645 | return -ENOMEM; | 645 | return -ENOMEM; |
646 | op->n_pages = 1; | 646 | atomic_set(&op->n_pages, 1); |
647 | 647 | ||
648 | spin_lock(&cookie->lock); | 648 | spin_lock(&cookie->lock); |
649 | 649 | ||