X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=fs%2Fcachefiles%2Fnamei.c;h=3f7c2cd41f8fd927f659b1363fa22f57e63b7614;hb=db20a8925bc420eed033c5d91ff6afa74465e521;hp=4ae75006e73bd20e04562240e1e85e63b63f74a4;hpb=82b23cb94b8cee25781c209d9b1df3b144c8bb5f;p=cascardo%2Flinux.git 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: void cachefiles_mark_object_inactive(struct cachefiles_cache *cache, struct cachefiles_object *object) { + blkcnt_t i_blocks = d_backing_inode(object->dentry)->i_blocks; + write_lock(&cache->active_lock); rb_erase(&object->active_node, &cache->active_nodes); clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); @@ -273,8 +275,7 @@ void cachefiles_mark_object_inactive(struct cachefiles_cache *cache, /* This object can now be culled, so we need to let the daemon know * that there is something it can remove if it needs to. */ - atomic_long_add(d_backing_inode(object->dentry)->i_blocks, - &cache->b_released); + atomic_long_add(i_blocks, &cache->b_released); if (atomic_inc_return(&cache->f_released)) cachefiles_state_changed(cache); }