|
@@ -253,6 +253,8 @@ static void cachefiles_drop_object(struct fscache_object *_object)
|
|
|
struct cachefiles_object *object;
|
|
|
struct cachefiles_cache *cache;
|
|
|
const struct cred *saved_cred;
|
|
|
+ struct inode *inode;
|
|
|
+ blkcnt_t i_blocks = 0;
|
|
|
|
|
|
ASSERT(_object);
|
|
|
|
|
@@ -279,6 +281,10 @@ static void cachefiles_drop_object(struct fscache_object *_object)
|
|
|
_object != cache->cache.fsdef
|
|
|
) {
|
|
|
_debug("- retire object OBJ%x", object->fscache.debug_id);
|
|
|
+ inode = d_backing_inode(object->dentry);
|
|
|
+ if (inode)
|
|
|
+ i_blocks = inode->i_blocks;
|
|
|
+
|
|
|
cachefiles_begin_secure(cache, &saved_cred);
|
|
|
cachefiles_delete_object(cache, object);
|
|
|
cachefiles_end_secure(cache, saved_cred);
|
|
@@ -292,7 +298,7 @@ static void cachefiles_drop_object(struct fscache_object *_object)
|
|
|
|
|
|
/* note that the object is now inactive */
|
|
|
if (test_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags))
|
|
|
- cachefiles_mark_object_inactive(cache, object);
|
|
|
+ cachefiles_mark_object_inactive(cache, object, i_blocks);
|
|
|
|
|
|
dput(object->dentry);
|
|
|
object->dentry = NULL;
|