diff options
-rw-r--r-- | fs/cachefiles/namei.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 4ae75006e73b..3f7c2cd41f8f 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c | |||
@@ -263,6 +263,8 @@ requeue: | |||
263 | void cachefiles_mark_object_inactive(struct cachefiles_cache *cache, | 263 | void cachefiles_mark_object_inactive(struct cachefiles_cache *cache, |
264 | struct cachefiles_object *object) | 264 | struct cachefiles_object *object) |
265 | { | 265 | { |
266 | blkcnt_t i_blocks = d_backing_inode(object->dentry)->i_blocks; | ||
267 | |||
266 | write_lock(&cache->active_lock); | 268 | write_lock(&cache->active_lock); |
267 | rb_erase(&object->active_node, &cache->active_nodes); | 269 | rb_erase(&object->active_node, &cache->active_nodes); |
268 | clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); | 270 | clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); |
@@ -273,8 +275,7 @@ void cachefiles_mark_object_inactive(struct cachefiles_cache *cache, | |||
273 | /* This object can now be culled, so we need to let the daemon know | 275 | /* This object can now be culled, so we need to let the daemon know |
274 | * that there is something it can remove if it needs to. | 276 | * that there is something it can remove if it needs to. |
275 | */ | 277 | */ |
276 | atomic_long_add(d_backing_inode(object->dentry)->i_blocks, | 278 | atomic_long_add(i_blocks, &cache->b_released); |
277 | &cache->b_released); | ||
278 | if (atomic_inc_return(&cache->f_released)) | 279 | if (atomic_inc_return(&cache->f_released)) |
279 | cachefiles_state_changed(cache); | 280 | cachefiles_state_changed(cache); |
280 | } | 281 | } |