Skip to content

Commit ea4fd93

Browse files
Matthew Wilcox (Oracle)tytso
authored andcommitted
ext4: remove calls to to set/clear the folio error flag
Nobody checks this flag on ext4 folios, stop setting and clearing it. Cc: Theodore Ts'o <tytso@mit.edu> Cc: Andreas Dilger <adilger.kernel@dilger.ca> Cc: linux-ext4@vger.kernel.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20240420025029.2166544-11-willy@infradead.org Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent dc1c466 commit ea4fd93

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

fs/ext4/move_extent.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,8 @@ mext_page_mkuptodate(struct folio *folio, unsigned from, unsigned to)
199199
continue;
200200
if (!buffer_mapped(bh)) {
201201
err = ext4_get_block(inode, block, bh, 0);
202-
if (err) {
203-
folio_set_error(folio);
202+
if (err)
204203
return err;
205-
}
206204
if (!buffer_mapped(bh)) {
207205
folio_zero_range(folio, block_start, blocksize);
208206
set_buffer_uptodate(bh);

fs/ext4/page-io.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ static void ext4_finish_bio(struct bio *bio)
117117

118118
if (bio->bi_status) {
119119
int err = blk_status_to_errno(bio->bi_status);
120-
folio_set_error(folio);
121120
mapping_set_error(folio->mapping, err);
122121
}
123122
bh = head = folio_buffers(folio);
@@ -441,8 +440,6 @@ int ext4_bio_write_folio(struct ext4_io_submit *io, struct folio *folio,
441440
BUG_ON(!folio_test_locked(folio));
442441
BUG_ON(folio_test_writeback(folio));
443442

444-
folio_clear_error(folio);
445-
446443
/*
447444
* Comments copied from block_write_full_folio:
448445
*

fs/ext4/readpage.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ int ext4_mpage_readpages(struct inode *inode,
289289

290290
if (ext4_map_blocks(NULL, inode, &map, 0) < 0) {
291291
set_error_page:
292-
folio_set_error(folio);
293292
folio_zero_segment(folio, 0,
294293
folio_size(folio));
295294
folio_unlock(folio);

0 commit comments

Comments
 (0)