diff mbox series

[07/24] ntfs: Remove check for PageError

Message ID 20220527155036.524743-8-willy@infradead.org (mailing list archive)
State New
Headers show
Series Begin removing PageError | expand

Commit Message

Matthew Wilcox (Oracle) May 27, 2022, 3:50 p.m. UTC
If read_mapping_page() encounters an error, it returns an errno, not a
page with PageError set, so this is dead code.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/ntfs/file.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Christoph Hellwig May 28, 2022, 5:48 a.m. UTC | #1
On Fri, May 27, 2022 at 04:50:19PM +0100, Matthew Wilcox (Oracle) wrote:
> If read_mapping_page() encounters an error, it returns an errno, not a
> page with PageError set, so this is dead code.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index e1392a9b8ceb..37224ebdcd10 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -219,11 +219,6 @@  static int ntfs_attr_extend_initialized(ntfs_inode *ni, const s64 new_init_size)
 			err = PTR_ERR(page);
 			goto init_err_out;
 		}
-		if (unlikely(PageError(page))) {
-			put_page(page);
-			err = -EIO;
-			goto init_err_out;
-		}
 		/*
 		 * Update the initialized size in the ntfs inode.  This is
 		 * enough to make ntfs_writepage() work.