Commit 7898575fc81bd707ce0844cb06874d48e39bbe09
Committed by
Al Viro
1 parent
d30357f2f0
Exists in
master
and in
20 other branches
mm: drop vmtruncate
Removed vmtruncate Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 2 changed files with 0 additions and 24 deletions Side-by-side Diff
include/linux/mm.h
... | ... | @@ -1007,7 +1007,6 @@ |
1007 | 1007 | |
1008 | 1008 | extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new); |
1009 | 1009 | extern void truncate_setsize(struct inode *inode, loff_t newsize); |
1010 | -extern int vmtruncate(struct inode *inode, loff_t offset); | |
1011 | 1010 | void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end); |
1012 | 1011 | int truncate_inode_page(struct address_space *mapping, struct page *page); |
1013 | 1012 | int generic_error_remove_page(struct address_space *mapping, struct page *page); |
mm/truncate.c
... | ... | @@ -577,29 +577,6 @@ |
577 | 577 | EXPORT_SYMBOL(truncate_setsize); |
578 | 578 | |
579 | 579 | /** |
580 | - * vmtruncate - unmap mappings "freed" by truncate() syscall | |
581 | - * @inode: inode of the file used | |
582 | - * @newsize: file offset to start truncating | |
583 | - * | |
584 | - * This function is deprecated and truncate_setsize or truncate_pagecache | |
585 | - * should be used instead, together with filesystem specific block truncation. | |
586 | - */ | |
587 | -int vmtruncate(struct inode *inode, loff_t newsize) | |
588 | -{ | |
589 | - int error; | |
590 | - | |
591 | - error = inode_newsize_ok(inode, newsize); | |
592 | - if (error) | |
593 | - return error; | |
594 | - | |
595 | - truncate_setsize(inode, newsize); | |
596 | - if (inode->i_op->truncate) | |
597 | - inode->i_op->truncate(inode); | |
598 | - return 0; | |
599 | -} | |
600 | -EXPORT_SYMBOL(vmtruncate); | |
601 | - | |
602 | -/** | |
603 | 580 | * truncate_pagecache_range - unmap and remove pagecache that is hole-punched |
604 | 581 | * @inode: inode |
605 | 582 | * @lstart: offset of beginning of hole |