diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/truncate.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/mm/truncate.c b/mm/truncate.c index d51ce92d6e83..c75b736e54b7 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -577,29 +577,6 @@ void truncate_setsize(struct inode *inode, loff_t newsize) | |||
577 | EXPORT_SYMBOL(truncate_setsize); | 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 | * truncate_pagecache_range - unmap and remove pagecache that is hole-punched | 580 | * truncate_pagecache_range - unmap and remove pagecache that is hole-punched |
604 | * @inode: inode | 581 | * @inode: inode |
605 | * @lstart: offset of beginning of hole | 582 | * @lstart: offset of beginning of hole |