static void vvp_object_size_unlock(struct cl_object *obj) { struct inode *inode = vvp_object_inode(obj); cl_object_attr_unlock(obj); ll_inode_size_unlock(inode); }
static int vvp_do_vmtruncate(struct inode *inode, size_t size) { int result; loff_t oldsize; /* * Only ll_inode_size_lock is taken at this level. */ ll_inode_size_lock(inode); result = inode_newsize_ok(inode, size); if (result < 0) { ll_inode_size_unlock(inode); return result; } oldsize = inode->i_size; i_size_write(inode, size); truncate_pagecache(inode, oldsize, size); ll_inode_size_unlock(inode); return result; }