Skip to content

Commit f25dfb5

Browse files
NTFS: Remove bogus setting of PageError in ntfs_read_compressed_block().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
1 parent 8e08cea commit f25dfb5

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

‎fs/ntfs/ChangeLog‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ ToDo/Notes:
5858
- Fix a bug in fs/ntfs/index.c::ntfs_index_lookup(). When the returned
5959
index entry is in the index root, we forgot to set the @ir pointer in
6060
the index context. Thanks to Yura Pakhuchiy for finding this bug.
61+
- Remove bogus setting of PageError in ntfs_read_compressed_block().
6162

6263
2.1.23 - Implement extension of resident files and make writing safe as well as
6364
many bug fixes, cleanups, and enhancements...

‎fs/ntfs/compress.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,6 @@ int ntfs_read_compressed_block(struct page *page)
539539
if (unlikely(!pages || !bhs)) {
540540
kfree(bhs);
541541
kfree(pages);
542-
SetPageError(page);
543542
unlock_page(page);
544543
ntfs_error(vol->sb, "Failed to allocate internal buffers.");
545544
return -ENOMEM;
@@ -871,9 +870,6 @@ int ntfs_read_compressed_block(struct page *page)
871870
for (; prev_cur_page < cur_page; prev_cur_page++) {
872871
page = pages[prev_cur_page];
873872
if (page) {
874-
if (prev_cur_page == xpage &&
875-
!xpage_done)
876-
SetPageError(page);
877873
flush_dcache_page(page);
878874
kunmap(page);
879875
unlock_page(page);
@@ -904,8 +900,6 @@ int ntfs_read_compressed_block(struct page *page)
904900
"Terminating them with extreme "
905901
"prejudice. Inode 0x%lx, page index "
906902
"0x%lx.", ni->mft_no, page->index);
907-
if (cur_page == xpage && !xpage_done)
908-
SetPageError(page);
909903
flush_dcache_page(page);
910904
kunmap(page);
911905
unlock_page(page);
@@ -953,8 +947,6 @@ int ntfs_read_compressed_block(struct page *page)
953947
for (i = cur_page; i < max_page; i++) {
954948
page = pages[i];
955949
if (page) {
956-
if (i == xpage && !xpage_done)
957-
SetPageError(page);
958950
flush_dcache_page(page);
959951
kunmap(page);
960952
unlock_page(page);

‎fs/ntfs/file.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* file.c - NTFS kernel file operations. Part of the Linux-NTFS project.
2+
* file.c - NTFS kernel file operations. Part of the Linux-NTFS project.
33
*
4-
* Copyright (c) 2001-2004 Anton Altaparmakov
4+
* Copyright (c) 2001-2005 Anton Altaparmakov
55
*
66
* This program/include file is free software; you can redistribute it and/or
77
* modify it under the terms of the GNU General Public License as published
@@ -94,6 +94,11 @@ static int ntfs_file_fsync(struct file *filp, struct dentry *dentry,
9494
if (!datasync || !NInoNonResident(NTFS_I(vi)))
9595
ret = ntfs_write_inode(vi, 1);
9696
write_inode_now(vi, !datasync);
97+
/*
98+
* NOTE: If we were to use mapping->private_list (see ext2 and
99+
* fs/buffer.c) for dirty blocks then we could optimize the below to be
100+
* sync_mapping_buffers(vi->i_mapping).
101+
*/
97102
err = sync_blockdev(vi->i_sb->s_bdev);
98103
if (unlikely(err && !ret))
99104
ret = err;

0 commit comments

Comments
 (0)