diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index fad68ff0b6ed..6fc4f960f4d9 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -1122,6 +1122,13 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from) } goto out; } + } else if (to & (frame_size - 1)) { + for (ip = to >> PAGE_SHIFT, off = offset_in_page(to); + ip < pages_per_frame; + ip++, off = 0) { + zero_user_segment(pages[ip], off, PAGE_SIZE); + flush_dcache_page(pages[ip]); + } } }