aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2023-05-30 01:45:28 +0000
committerDavid Sterba <[email protected]>2023-06-19 11:59:31 +0000
commit31dd8c81ddfa142dab53a0837eed88e8febe7b1e (patch)
tree3b4829c02a9325784f66bf3767d5d10dff07269e /fs/btrfs/extent_io.c
parentbtrfs: subpage: make alloc_extent_buffer() handle previously uptodate range e... (diff)
downloadkernel-31dd8c81ddfa142dab53a0837eed88e8febe7b1e.tar.gz
kernel-31dd8c81ddfa142dab53a0837eed88e8febe7b1e.zip
btrfs: use the same uptodate variable for end_bio_extent_readpage()
In function end_bio_extent_readpage() we call endio_readpage_release_extent() to unlock the extent io tree. However we pass PageUptodate(page) as @uptodate parameter for it, while for previous end_page_read() call, we use a dedicated @uptodate local variable. This is not a big deal, as even for subpage cases, either the bio only covers part of the page, then the @uptodate is always false, and the subpage ranges can still be merged. But for the sake of consistency, always use @uptodate variable when possible. Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Anand Jain <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f578813be749..d5b3b15f7ab2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -745,7 +745,7 @@ static void end_bio_extent_readpage(struct btrfs_bio *bbio)
/* Update page status and unlock. */
end_page_read(page, uptodate, start, len);
endio_readpage_release_extent(&processed, BTRFS_I(inode),
- start, end, PageUptodate(page));
+ start, end, uptodate);
ASSERT(bio_offset + len > bio_offset);
bio_offset += len;