|
@@ -576,29 +576,6 @@ void truncate_setsize(struct inode *inode, loff_t newsize)
|
|
|
}
|
|
|
EXPORT_SYMBOL(truncate_setsize);
|
|
|
|
|
|
-/**
|
|
|
- * vmtruncate - unmap mappings "freed" by truncate() syscall
|
|
|
- * @inode: inode of the file used
|
|
|
- * @newsize: file offset to start truncating
|
|
|
- *
|
|
|
- * This function is deprecated and truncate_setsize or truncate_pagecache
|
|
|
- * should be used instead, together with filesystem specific block truncation.
|
|
|
- */
|
|
|
-int vmtruncate(struct inode *inode, loff_t newsize)
|
|
|
-{
|
|
|
- int error;
|
|
|
-
|
|
|
- error = inode_newsize_ok(inode, newsize);
|
|
|
- if (error)
|
|
|
- return error;
|
|
|
-
|
|
|
- truncate_setsize(inode, newsize);
|
|
|
- if (inode->i_op->truncate)
|
|
|
- inode->i_op->truncate(inode);
|
|
|
- return 0;
|
|
|
-}
|
|
|
-EXPORT_SYMBOL(vmtruncate);
|
|
|
-
|
|
|
/**
|
|
|
* truncate_pagecache_range - unmap and remove pagecache that is hole-punched
|
|
|
* @inode: inode
|