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 /fs | |
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 'fs')
-rw-r--r-- | fs/adfs/inode.c | 2 | ||||
-rw-r--r-- | fs/affs/file.c | 2 | ||||
-rw-r--r-- | fs/bfs/file.c | 2 | ||||
-rw-r--r-- | fs/btrfs/free-space-cache.c | 4 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 2 | ||||
-rw-r--r-- | fs/cifs/inode.c | 5 | ||||
-rw-r--r-- | fs/exofs/inode.c | 2 | ||||
-rw-r--r-- | fs/ext2/inode.c | 2 | ||||
-rw-r--r-- | fs/ext4/inode.c | 3 | ||||
-rw-r--r-- | fs/fat/inode.c | 2 | ||||
-rw-r--r-- | fs/fuse/dir.c | 2 | ||||
-rw-r--r-- | fs/fuse/inode.c | 2 | ||||
-rw-r--r-- | fs/gfs2/bmap.c | 4 | ||||
-rw-r--r-- | fs/hfs/inode.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/inode.c | 2 | ||||
-rw-r--r-- | fs/hpfs/file.c | 2 | ||||
-rw-r--r-- | fs/jfs/inode.c | 2 | ||||
-rw-r--r-- | fs/minix/inode.c | 2 | ||||
-rw-r--r-- | fs/nfs/inode.c | 4 | ||||
-rw-r--r-- | fs/nilfs2/inode.c | 2 | ||||
-rw-r--r-- | fs/ntfs/file.c | 2 | ||||
-rw-r--r-- | fs/omfs/file.c | 2 | ||||
-rw-r--r-- | fs/sysv/itree.c | 2 | ||||
-rw-r--r-- | fs/udf/inode.c | 2 | ||||
-rw-r--r-- | fs/ufs/inode.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_aops.c | 4 |
26 files changed, 28 insertions, 36 deletions
diff --git a/fs/adfs/inode.c b/fs/adfs/inode.c index 5f95d1ed9c6d..b9acadafa4a1 100644 --- a/fs/adfs/inode.c +++ b/fs/adfs/inode.c | |||
@@ -50,7 +50,7 @@ static void adfs_write_failed(struct address_space *mapping, loff_t to) | |||
50 | struct inode *inode = mapping->host; | 50 | struct inode *inode = mapping->host; |
51 | 51 | ||
52 | if (to > inode->i_size) | 52 | if (to > inode->i_size) |
53 | truncate_pagecache(inode, to, inode->i_size); | 53 | truncate_pagecache(inode, inode->i_size); |
54 | } | 54 | } |
55 | 55 | ||
56 | static int adfs_write_begin(struct file *file, struct address_space *mapping, | 56 | static int adfs_write_begin(struct file *file, struct address_space *mapping, |
diff --git a/fs/affs/file.c b/fs/affs/file.c index 776e3935a758..8669b6ecddee 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c | |||
@@ -406,7 +406,7 @@ static void affs_write_failed(struct address_space *mapping, loff_t to) | |||
406 | struct inode *inode = mapping->host; | 406 | struct inode *inode = mapping->host; |
407 | 407 | ||
408 | if (to > inode->i_size) { | 408 | if (to > inode->i_size) { |
409 | truncate_pagecache(inode, to, inode->i_size); | 409 | truncate_pagecache(inode, inode->i_size); |
410 | affs_truncate(inode); | 410 | affs_truncate(inode); |
411 | } | 411 | } |
412 | } | 412 | } |
diff --git a/fs/bfs/file.c b/fs/bfs/file.c index ad3ea1497cc3..ae2892218335 100644 --- a/fs/bfs/file.c +++ b/fs/bfs/file.c | |||
@@ -166,7 +166,7 @@ static void bfs_write_failed(struct address_space *mapping, loff_t to) | |||
166 | struct inode *inode = mapping->host; | 166 | struct inode *inode = mapping->host; |
167 | 167 | ||
168 | if (to > inode->i_size) | 168 | if (to > inode->i_size) |
169 | truncate_pagecache(inode, to, inode->i_size); | 169 | truncate_pagecache(inode, inode->i_size); |
170 | } | 170 | } |
171 | 171 | ||
172 | static int bfs_write_begin(struct file *file, struct address_space *mapping, | 172 | static int bfs_write_begin(struct file *file, struct address_space *mapping, |
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index b21a3cd667d8..256d9597f0cf 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -221,12 +221,10 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root, | |||
221 | struct btrfs_path *path, | 221 | struct btrfs_path *path, |
222 | struct inode *inode) | 222 | struct inode *inode) |
223 | { | 223 | { |
224 | loff_t oldsize; | ||
225 | int ret = 0; | 224 | int ret = 0; |
226 | 225 | ||
227 | oldsize = i_size_read(inode); | ||
228 | btrfs_i_size_write(inode, 0); | 226 | btrfs_i_size_write(inode, 0); |
229 | truncate_pagecache(inode, oldsize, 0); | 227 | truncate_pagecache(inode, 0); |
230 | 228 | ||
231 | /* | 229 | /* |
232 | * We don't need an orphan item because truncating the free space cache | 230 | * We don't need an orphan item because truncating the free space cache |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7bdc83d04d54..82fdd7059d10 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -4409,7 +4409,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) | |||
4409 | inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); | 4409 | inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); |
4410 | 4410 | ||
4411 | if (newsize > oldsize) { | 4411 | if (newsize > oldsize) { |
4412 | truncate_pagecache(inode, oldsize, newsize); | 4412 | truncate_pagecache(inode, newsize); |
4413 | ret = btrfs_cont_expand(inode, oldsize, newsize); | 4413 | ret = btrfs_cont_expand(inode, oldsize, newsize); |
4414 | if (ret) | 4414 | if (ret) |
4415 | return ret; | 4415 | return ret; |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 449b6cf09b09..2a92c5c6ecfd 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -1852,14 +1852,11 @@ static int cifs_truncate_page(struct address_space *mapping, loff_t from) | |||
1852 | 1852 | ||
1853 | static void cifs_setsize(struct inode *inode, loff_t offset) | 1853 | static void cifs_setsize(struct inode *inode, loff_t offset) |
1854 | { | 1854 | { |
1855 | loff_t oldsize; | ||
1856 | |||
1857 | spin_lock(&inode->i_lock); | 1855 | spin_lock(&inode->i_lock); |
1858 | oldsize = inode->i_size; | ||
1859 | i_size_write(inode, offset); | 1856 | i_size_write(inode, offset); |
1860 | spin_unlock(&inode->i_lock); | 1857 | spin_unlock(&inode->i_lock); |
1861 | 1858 | ||
1862 | truncate_pagecache(inode, oldsize, offset); | 1859 | truncate_pagecache(inode, offset); |
1863 | } | 1860 | } |
1864 | 1861 | ||
1865 | static int | 1862 | static int |
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index 2ec8eb1ab269..a52a5d23c30b 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
@@ -861,7 +861,7 @@ static int exofs_writepage(struct page *page, struct writeback_control *wbc) | |||
861 | static void _write_failed(struct inode *inode, loff_t to) | 861 | static void _write_failed(struct inode *inode, loff_t to) |
862 | { | 862 | { |
863 | if (to > inode->i_size) | 863 | if (to > inode->i_size) |
864 | truncate_pagecache(inode, to, inode->i_size); | 864 | truncate_pagecache(inode, inode->i_size); |
865 | } | 865 | } |
866 | 866 | ||
867 | int exofs_write_begin(struct file *file, struct address_space *mapping, | 867 | int exofs_write_begin(struct file *file, struct address_space *mapping, |
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 0a87bb10998d..c260de6d7b6d 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -58,7 +58,7 @@ static void ext2_write_failed(struct address_space *mapping, loff_t to) | |||
58 | struct inode *inode = mapping->host; | 58 | struct inode *inode = mapping->host; |
59 | 59 | ||
60 | if (to > inode->i_size) { | 60 | if (to > inode->i_size) { |
61 | truncate_pagecache(inode, to, inode->i_size); | 61 | truncate_pagecache(inode, inode->i_size); |
62 | ext2_truncate_blocks(inode, inode->i_size); | 62 | ext2_truncate_blocks(inode, inode->i_size); |
63 | } | 63 | } |
64 | } | 64 | } |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index c79fd7dabe79..0d424d7ac02b 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -4587,7 +4587,6 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) | |||
4587 | 4587 | ||
4588 | if (attr->ia_valid & ATTR_SIZE && attr->ia_size != inode->i_size) { | 4588 | if (attr->ia_valid & ATTR_SIZE && attr->ia_size != inode->i_size) { |
4589 | handle_t *handle; | 4589 | handle_t *handle; |
4590 | loff_t oldsize = inode->i_size; | ||
4591 | 4590 | ||
4592 | if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) { | 4591 | if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) { |
4593 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); | 4592 | struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); |
@@ -4650,7 +4649,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) | |||
4650 | * Truncate pagecache after we've waited for commit | 4649 | * Truncate pagecache after we've waited for commit |
4651 | * in data=journal mode to make pages freeable. | 4650 | * in data=journal mode to make pages freeable. |
4652 | */ | 4651 | */ |
4653 | truncate_pagecache(inode, oldsize, inode->i_size); | 4652 | truncate_pagecache(inode, inode->i_size); |
4654 | } | 4653 | } |
4655 | /* | 4654 | /* |
4656 | * We want to call ext4_truncate() even if attr->ia_size == | 4655 | * We want to call ext4_truncate() even if attr->ia_size == |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 11b51bb55b42..0062da21dd8b 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -147,7 +147,7 @@ static void fat_write_failed(struct address_space *mapping, loff_t to) | |||
147 | struct inode *inode = mapping->host; | 147 | struct inode *inode = mapping->host; |
148 | 148 | ||
149 | if (to > inode->i_size) { | 149 | if (to > inode->i_size) { |
150 | truncate_pagecache(inode, to, inode->i_size); | 150 | truncate_pagecache(inode, inode->i_size); |
151 | fat_truncate_blocks(inode, inode->i_size); | 151 | fat_truncate_blocks(inode, inode->i_size); |
152 | } | 152 | } |
153 | } | 153 | } |
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 3ac91086f41f..62b43b577bfc 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -1678,7 +1678,7 @@ int fuse_do_setattr(struct inode *inode, struct iattr *attr, | |||
1678 | * FUSE_NOWRITE, otherwise fuse_launder_page() would deadlock. | 1678 | * FUSE_NOWRITE, otherwise fuse_launder_page() would deadlock. |
1679 | */ | 1679 | */ |
1680 | if (S_ISREG(inode->i_mode) && oldsize != outarg.attr.size) { | 1680 | if (S_ISREG(inode->i_mode) && oldsize != outarg.attr.size) { |
1681 | truncate_pagecache(inode, oldsize, outarg.attr.size); | 1681 | truncate_pagecache(inode, outarg.attr.size); |
1682 | invalidate_inode_pages2(inode->i_mapping); | 1682 | invalidate_inode_pages2(inode->i_mapping); |
1683 | } | 1683 | } |
1684 | 1684 | ||
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 84434594e80e..a8ce6dab60a0 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -218,7 +218,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr, | |||
218 | bool inval = false; | 218 | bool inval = false; |
219 | 219 | ||
220 | if (oldsize != attr->size) { | 220 | if (oldsize != attr->size) { |
221 | truncate_pagecache(inode, oldsize, attr->size); | 221 | truncate_pagecache(inode, attr->size); |
222 | inval = true; | 222 | inval = true; |
223 | } else if (fc->auto_inval_data) { | 223 | } else if (fc->auto_inval_data) { |
224 | struct timespec new_mtime = { | 224 | struct timespec new_mtime = { |
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 5e2f56fccf6b..62a65fc448dc 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -1016,7 +1016,7 @@ static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize | |||
1016 | chunk = oldsize - newsize; | 1016 | chunk = oldsize - newsize; |
1017 | if (chunk > max_chunk) | 1017 | if (chunk > max_chunk) |
1018 | chunk = max_chunk; | 1018 | chunk = max_chunk; |
1019 | truncate_pagecache(inode, oldsize, oldsize - chunk); | 1019 | truncate_pagecache(inode, oldsize - chunk); |
1020 | oldsize -= chunk; | 1020 | oldsize -= chunk; |
1021 | gfs2_trans_end(sdp); | 1021 | gfs2_trans_end(sdp); |
1022 | error = gfs2_trans_begin(sdp, RES_DINODE, GFS2_JTRUNC_REVOKES); | 1022 | error = gfs2_trans_begin(sdp, RES_DINODE, GFS2_JTRUNC_REVOKES); |
@@ -1067,7 +1067,7 @@ static int trunc_start(struct inode *inode, u64 oldsize, u64 newsize) | |||
1067 | if (journaled) | 1067 | if (journaled) |
1068 | error = gfs2_journaled_truncate(inode, oldsize, newsize); | 1068 | error = gfs2_journaled_truncate(inode, oldsize, newsize); |
1069 | else | 1069 | else |
1070 | truncate_pagecache(inode, oldsize, newsize); | 1070 | truncate_pagecache(inode, newsize); |
1071 | 1071 | ||
1072 | if (error) { | 1072 | if (error) { |
1073 | brelse(dibh); | 1073 | brelse(dibh); |
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index f9299d8a64e3..380ab31b5e0f 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c | |||
@@ -41,7 +41,7 @@ static void hfs_write_failed(struct address_space *mapping, loff_t to) | |||
41 | struct inode *inode = mapping->host; | 41 | struct inode *inode = mapping->host; |
42 | 42 | ||
43 | if (to > inode->i_size) { | 43 | if (to > inode->i_size) { |
44 | truncate_pagecache(inode, to, inode->i_size); | 44 | truncate_pagecache(inode, inode->i_size); |
45 | hfs_file_truncate(inode); | 45 | hfs_file_truncate(inode); |
46 | } | 46 | } |
47 | } | 47 | } |
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 4d2edaea891c..37213d075f3c 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -36,7 +36,7 @@ static void hfsplus_write_failed(struct address_space *mapping, loff_t to) | |||
36 | struct inode *inode = mapping->host; | 36 | struct inode *inode = mapping->host; |
37 | 37 | ||
38 | if (to > inode->i_size) { | 38 | if (to > inode->i_size) { |
39 | truncate_pagecache(inode, to, inode->i_size); | 39 | truncate_pagecache(inode, inode->i_size); |
40 | hfsplus_file_truncate(inode); | 40 | hfsplus_file_truncate(inode); |
41 | } | 41 | } |
42 | } | 42 | } |
diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c index 4e9dabcf1f4c..67c1a61e0955 100644 --- a/fs/hpfs/file.c +++ b/fs/hpfs/file.c | |||
@@ -138,7 +138,7 @@ static void hpfs_write_failed(struct address_space *mapping, loff_t to) | |||
138 | hpfs_lock(inode->i_sb); | 138 | hpfs_lock(inode->i_sb); |
139 | 139 | ||
140 | if (to > inode->i_size) { | 140 | if (to > inode->i_size) { |
141 | truncate_pagecache(inode, to, inode->i_size); | 141 | truncate_pagecache(inode, inode->i_size); |
142 | hpfs_truncate(inode); | 142 | hpfs_truncate(inode); |
143 | } | 143 | } |
144 | 144 | ||
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 730f24e282a6..f4aab719add5 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -306,7 +306,7 @@ static void jfs_write_failed(struct address_space *mapping, loff_t to) | |||
306 | struct inode *inode = mapping->host; | 306 | struct inode *inode = mapping->host; |
307 | 307 | ||
308 | if (to > inode->i_size) { | 308 | if (to > inode->i_size) { |
309 | truncate_pagecache(inode, to, inode->i_size); | 309 | truncate_pagecache(inode, inode->i_size); |
310 | jfs_truncate(inode); | 310 | jfs_truncate(inode); |
311 | } | 311 | } |
312 | } | 312 | } |
diff --git a/fs/minix/inode.c b/fs/minix/inode.c index df122496f328..0332109162a5 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c | |||
@@ -400,7 +400,7 @@ static void minix_write_failed(struct address_space *mapping, loff_t to) | |||
400 | struct inode *inode = mapping->host; | 400 | struct inode *inode = mapping->host; |
401 | 401 | ||
402 | if (to > inode->i_size) { | 402 | if (to > inode->i_size) { |
403 | truncate_pagecache(inode, to, inode->i_size); | 403 | truncate_pagecache(inode, inode->i_size); |
404 | minix_truncate(inode); | 404 | minix_truncate(inode); |
405 | } | 405 | } |
406 | } | 406 | } |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 87e797640828..eda8879171c4 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -541,7 +541,6 @@ EXPORT_SYMBOL_GPL(nfs_setattr); | |||
541 | */ | 541 | */ |
542 | static int nfs_vmtruncate(struct inode * inode, loff_t offset) | 542 | static int nfs_vmtruncate(struct inode * inode, loff_t offset) |
543 | { | 543 | { |
544 | loff_t oldsize; | ||
545 | int err; | 544 | int err; |
546 | 545 | ||
547 | err = inode_newsize_ok(inode, offset); | 546 | err = inode_newsize_ok(inode, offset); |
@@ -549,11 +548,10 @@ static int nfs_vmtruncate(struct inode * inode, loff_t offset) | |||
549 | goto out; | 548 | goto out; |
550 | 549 | ||
551 | spin_lock(&inode->i_lock); | 550 | spin_lock(&inode->i_lock); |
552 | oldsize = inode->i_size; | ||
553 | i_size_write(inode, offset); | 551 | i_size_write(inode, offset); |
554 | spin_unlock(&inode->i_lock); | 552 | spin_unlock(&inode->i_lock); |
555 | 553 | ||
556 | truncate_pagecache(inode, oldsize, offset); | 554 | truncate_pagecache(inode, offset); |
557 | out: | 555 | out: |
558 | return err; | 556 | return err; |
559 | } | 557 | } |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index b1a5277cfd18..7e350c562e0e 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -254,7 +254,7 @@ void nilfs_write_failed(struct address_space *mapping, loff_t to) | |||
254 | struct inode *inode = mapping->host; | 254 | struct inode *inode = mapping->host; |
255 | 255 | ||
256 | if (to > inode->i_size) { | 256 | if (to > inode->i_size) { |
257 | truncate_pagecache(inode, to, inode->i_size); | 257 | truncate_pagecache(inode, inode->i_size); |
258 | nilfs_truncate(inode); | 258 | nilfs_truncate(inode); |
259 | } | 259 | } |
260 | } | 260 | } |
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index c5670b8d198c..ea4ba9daeb47 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
@@ -1768,7 +1768,7 @@ static void ntfs_write_failed(struct address_space *mapping, loff_t to) | |||
1768 | struct inode *inode = mapping->host; | 1768 | struct inode *inode = mapping->host; |
1769 | 1769 | ||
1770 | if (to > inode->i_size) { | 1770 | if (to > inode->i_size) { |
1771 | truncate_pagecache(inode, to, inode->i_size); | 1771 | truncate_pagecache(inode, inode->i_size); |
1772 | ntfs_truncate_vfs(inode); | 1772 | ntfs_truncate_vfs(inode); |
1773 | } | 1773 | } |
1774 | } | 1774 | } |
diff --git a/fs/omfs/file.c b/fs/omfs/file.c index e0d9b3e722bd..54d57d6ba68d 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c | |||
@@ -311,7 +311,7 @@ static void omfs_write_failed(struct address_space *mapping, loff_t to) | |||
311 | struct inode *inode = mapping->host; | 311 | struct inode *inode = mapping->host; |
312 | 312 | ||
313 | if (to > inode->i_size) { | 313 | if (to > inode->i_size) { |
314 | truncate_pagecache(inode, to, inode->i_size); | 314 | truncate_pagecache(inode, inode->i_size); |
315 | omfs_truncate(inode); | 315 | omfs_truncate(inode); |
316 | } | 316 | } |
317 | } | 317 | } |
diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c index c1a591a4725b..66bc316927e8 100644 --- a/fs/sysv/itree.c +++ b/fs/sysv/itree.c | |||
@@ -469,7 +469,7 @@ static void sysv_write_failed(struct address_space *mapping, loff_t to) | |||
469 | struct inode *inode = mapping->host; | 469 | struct inode *inode = mapping->host; |
470 | 470 | ||
471 | if (to > inode->i_size) { | 471 | if (to > inode->i_size) { |
472 | truncate_pagecache(inode, to, inode->i_size); | 472 | truncate_pagecache(inode, inode->i_size); |
473 | sysv_truncate(inode); | 473 | sysv_truncate(inode); |
474 | } | 474 | } |
475 | } | 475 | } |
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index b6d15d349810..062b7925bca0 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -172,7 +172,7 @@ static void udf_write_failed(struct address_space *mapping, loff_t to) | |||
172 | loff_t isize = inode->i_size; | 172 | loff_t isize = inode->i_size; |
173 | 173 | ||
174 | if (to > isize) { | 174 | if (to > isize) { |
175 | truncate_pagecache(inode, to, isize); | 175 | truncate_pagecache(inode, isize); |
176 | if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) { | 176 | if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) { |
177 | down_write(&iinfo->i_data_sem); | 177 | down_write(&iinfo->i_data_sem); |
178 | udf_clear_extent_cache(inode); | 178 | udf_clear_extent_cache(inode); |
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index ff24e4449ece..c8ca96086784 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -531,7 +531,7 @@ static void ufs_write_failed(struct address_space *mapping, loff_t to) | |||
531 | struct inode *inode = mapping->host; | 531 | struct inode *inode = mapping->host; |
532 | 532 | ||
533 | if (to > inode->i_size) | 533 | if (to > inode->i_size) |
534 | truncate_pagecache(inode, to, inode->i_size); | 534 | truncate_pagecache(inode, inode->i_size); |
535 | } | 535 | } |
536 | 536 | ||
537 | static int ufs_write_begin(struct file *file, struct address_space *mapping, | 537 | static int ufs_write_begin(struct file *file, struct address_space *mapping, |
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 977da0ec6604..e51e581454e9 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
@@ -1582,7 +1582,7 @@ xfs_vm_write_begin( | |||
1582 | unlock_page(page); | 1582 | unlock_page(page); |
1583 | 1583 | ||
1584 | if (pos + len > i_size_read(inode)) | 1584 | if (pos + len > i_size_read(inode)) |
1585 | truncate_pagecache(inode, pos + len, i_size_read(inode)); | 1585 | truncate_pagecache(inode, i_size_read(inode)); |
1586 | 1586 | ||
1587 | page_cache_release(page); | 1587 | page_cache_release(page); |
1588 | page = NULL; | 1588 | page = NULL; |
@@ -1618,7 +1618,7 @@ xfs_vm_write_end( | |||
1618 | loff_t to = pos + len; | 1618 | loff_t to = pos + len; |
1619 | 1619 | ||
1620 | if (to > isize) { | 1620 | if (to > isize) { |
1621 | truncate_pagecache(inode, to, isize); | 1621 | truncate_pagecache(inode, isize); |
1622 | xfs_vm_kill_delalloc_range(inode, isize, to); | 1622 | xfs_vm_kill_delalloc_range(inode, isize, to); |
1623 | } | 1623 | } |
1624 | } | 1624 | } |