aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-09-12 18:13:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 18:38:02 -0400
commit7caef26767c1727d7abfbbbfbe8b2bb473430d48 (patch)
tree909e2a3c1b0a20a976fa3f84a17a00f8a21607bf /mm
parent5fbc461636c32efdb9d5216d491d37a40d54535b (diff)
truncate: drop 'oldsize' truncate_pagecache() parameter
truncate_pagecache() doesn't care about old size since commit cedabed49b39 ("vfs: Fix vmtruncate() regression"). Let's drop it. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/truncate.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mm/truncate.c b/mm/truncate.c
index e2e8a8a7eb9d..353b683afd6e 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -567,7 +567,6 @@ EXPORT_SYMBOL_GPL(invalidate_inode_pages2);
567/** 567/**
568 * truncate_pagecache - unmap and remove pagecache that has been truncated 568 * truncate_pagecache - unmap and remove pagecache that has been truncated
569 * @inode: inode 569 * @inode: inode
570 * @oldsize: old file size
571 * @newsize: new file size 570 * @newsize: new file size
572 * 571 *
573 * inode's new i_size must already be written before truncate_pagecache 572 * inode's new i_size must already be written before truncate_pagecache
@@ -580,7 +579,7 @@ EXPORT_SYMBOL_GPL(invalidate_inode_pages2);
580 * situations such as writepage being called for a page that has already 579 * situations such as writepage being called for a page that has already
581 * had its underlying blocks deallocated. 580 * had its underlying blocks deallocated.
582 */ 581 */
583void truncate_pagecache(struct inode *inode, loff_t oldsize, loff_t newsize) 582void truncate_pagecache(struct inode *inode, loff_t newsize)
584{ 583{
585 struct address_space *mapping = inode->i_mapping; 584 struct address_space *mapping = inode->i_mapping;
586 loff_t holebegin = round_up(newsize, PAGE_SIZE); 585 loff_t holebegin = round_up(newsize, PAGE_SIZE);
@@ -614,12 +613,8 @@ EXPORT_SYMBOL(truncate_pagecache);
614 */ 613 */
615void truncate_setsize(struct inode *inode, loff_t newsize) 614void truncate_setsize(struct inode *inode, loff_t newsize)
616{ 615{
617 loff_t oldsize;
618
619 oldsize = inode->i_size;
620 i_size_write(inode, newsize); 616 i_size_write(inode, newsize);
621 617 truncate_pagecache(inode, newsize);
622 truncate_pagecache(inode, oldsize, newsize);
623} 618}
624EXPORT_SYMBOL(truncate_setsize); 619EXPORT_SYMBOL(truncate_setsize);
625 620