diff options
author | Lukas Czerner <lczerner@redhat.com> | 2013-05-27 23:32:35 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-05-27 23:32:35 -0400 |
commit | 55f252c9f50e998f6bc3aadc7806f049f7443d21 (patch) | |
tree | 254070ad55a2e1011a11aa4ca0dbd0762354cced /fs/ext4/super.c | |
parent | eb3544c6fc6642c9037817980d8a9dc9df44aa45 (diff) |
ext4: truncate_inode_pages() in orphan cleanup path
Currently we do not tell mm to zero out tail of the page before truncate
in orphan_cleanup(). This is ok, because the page should not be
uptodate, however this may eventually change and I might cause problems.
Call truncate_inode_pages() as precautionary measure. Thanks Jan Kara
for pointing this out.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 94cc84db7c9a..c468560c8765 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2170,6 +2170,7 @@ static void ext4_orphan_cleanup(struct super_block *sb, jbd_debug(2, "truncating inode %lu to %lld bytes\n", inode->i_ino, inode->i_size); mutex_lock(&inode->i_mutex); + truncate_inode_pages(inode->i_mapping, inode->i_size); ext4_truncate(inode); mutex_unlock(&inode->i_mutex); nr_truncates++; |