diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2013-09-12 18:13:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 18:38:02 -0400 |
commit | 7caef26767c1727d7abfbbbfbe8b2bb473430d48 (patch) | |
tree | 909e2a3c1b0a20a976fa3f84a17a00f8a21607bf /mm | |
parent | 5fbc461636c32efdb9d5216d491d37a40d54535b (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.c | 9 |
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 | */ |
583 | void truncate_pagecache(struct inode *inode, loff_t oldsize, loff_t newsize) | 582 | void 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 | */ |
615 | void truncate_setsize(struct inode *inode, loff_t newsize) | 614 | void 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 | } |
624 | EXPORT_SYMBOL(truncate_setsize); | 619 | EXPORT_SYMBOL(truncate_setsize); |
625 | 620 | ||