]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm: drop vmtruncate
authorMarco Stornelli <marco.stornelli@gmail.com>
Sat, 15 Dec 2012 11:00:02 +0000 (12:00 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 20 Dec 2012 23:46:29 +0000 (18:46 -0500)
Removed vmtruncate

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/mm.h
mm/truncate.c

index 7f4f906190bd75edd941771fe5ce0f0ac2089424..63204078f72b9798901b6ef6371847ade8031809 100644 (file)
@@ -1007,7 +1007,6 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
 
 extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new);
 extern void truncate_setsize(struct inode *inode, loff_t newsize);
-extern int vmtruncate(struct inode *inode, loff_t offset);
 void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end);
 int truncate_inode_page(struct address_space *mapping, struct page *page);
 int generic_error_remove_page(struct address_space *mapping, struct page *page);
index d51ce92d6e83fefd08c2594d3ef8d25b1575f577..c75b736e54b793f338fce25f35afa60eb0faf5ef 100644 (file)
@@ -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