diff options
Diffstat (limited to 'fs/fscache/page.c')
-rw-r--r-- | fs/fscache/page.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fscache/page.c b/fs/fscache/page.c index e8bbc395cef6..c5973e38ce39 100644 --- a/fs/fscache/page.c +++ b/fs/fscache/page.c | |||
@@ -275,6 +275,9 @@ int __fscache_read_or_alloc_page(struct fscache_cookie *cookie, | |||
275 | 275 | ||
276 | ASSERTCMP(object->state, >, FSCACHE_OBJECT_LOOKING_UP); | 276 | ASSERTCMP(object->state, >, FSCACHE_OBJECT_LOOKING_UP); |
277 | 277 | ||
278 | atomic_inc(&object->n_reads); | ||
279 | set_bit(FSCACHE_OP_DEC_READ_CNT, &op->op.flags); | ||
280 | |||
278 | if (fscache_submit_op(object, &op->op) < 0) | 281 | if (fscache_submit_op(object, &op->op) < 0) |
279 | goto nobufs_unlock; | 282 | goto nobufs_unlock; |
280 | spin_unlock(&cookie->lock); | 283 | spin_unlock(&cookie->lock); |
@@ -386,6 +389,9 @@ int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie, | |||
386 | object = hlist_entry(cookie->backing_objects.first, | 389 | object = hlist_entry(cookie->backing_objects.first, |
387 | struct fscache_object, cookie_link); | 390 | struct fscache_object, cookie_link); |
388 | 391 | ||
392 | atomic_inc(&object->n_reads); | ||
393 | set_bit(FSCACHE_OP_DEC_READ_CNT, &op->op.flags); | ||
394 | |||
389 | if (fscache_submit_op(object, &op->op) < 0) | 395 | if (fscache_submit_op(object, &op->op) < 0) |
390 | goto nobufs_unlock; | 396 | goto nobufs_unlock; |
391 | spin_unlock(&cookie->lock); | 397 | spin_unlock(&cookie->lock); |