diff options
author | yangerkun <yangerkun@huawei.com> | 2019-02-11 08:05:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-23 22:11:24 +0300 |
commit | 7a34997043f1c042ae91d780630445bbf23fa435 (patch) | |
tree | d90c3ebdd8c1647a5aa48a098f266cdd5d55d1f7 /mm | |
parent | a0f6f657ac446194c190fab6aca9f6f71c8404f4 (diff) | |
download | linux-7a34997043f1c042ae91d780630445bbf23fa435.tar.xz |
ext4: cleanup pagecache before swap i_data
commit a46c68a318b08f819047843abf349aeee5d10ac2 upstream.
While do swap, we should make sure there has no new dirty page since we
should swap i_data between two inode:
1.We should lock i_mmap_sem with write to avoid new pagecache from mmap
read/write;
2.Change filemap_flush to filemap_write_and_wait and move them to the
space protected by inode lock to avoid new pagecache from buffer read/write.
Signed-off-by: yangerkun <yangerkun@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions