aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs/compress.c')
-rw-r--r--fs/ntfs/compress.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c
index d98daf59e0b6..d1619d05eb23 100644
--- a/fs/ntfs/compress.c
+++ b/fs/ntfs/compress.c
@@ -561,6 +561,16 @@ int ntfs_read_compressed_block(struct page *page)
561 read_unlock_irqrestore(&ni->size_lock, flags); 561 read_unlock_irqrestore(&ni->size_lock, flags);
562 max_page = ((i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) - 562 max_page = ((i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) -
563 offset; 563 offset;
564 /* Is the page fully outside i_size? (truncate in progress) */
565 if (xpage >= max_page) {
566 kfree(bhs);
567 kfree(pages);
568 zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
569 ntfs_debug("Compressed read outside i_size - truncated?");
570 SetPageUptodate(page);
571 unlock_page(page);
572 return 0;
573 }
564 if (nr_pages < max_page) 574 if (nr_pages < max_page)
565 max_page = nr_pages; 575 max_page = nr_pages;
566 for (i = 0; i < max_page; i++, offset++) { 576 for (i = 0; i < max_page; i++, offset++) {