]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: use the folio iterator in btrfs_end_super_write()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 20 Apr 2024 02:49:58 +0000 (03:49 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:10 +0000 (21:31 +0200)
commit617fb10ea838f48c88c7f010eb68d150350914c8
tree477d665b0b4e4a835acfd7fa53627adf91c3484a
parentf93ee0df51397a9432250798a93d2271ab86bb69
btrfs: use the folio iterator in btrfs_end_super_write()

Iterate over folios instead of bvecs.  Switch the order of unlock and put
to be the usual order; we know this folio can't be put until it's been
waited for, but that's fragile.  Remove the calls to ClearPageUptodate /
SetPageUptodate -- if PAGE_SIZE is larger than BTRFS_SUPER_INFO_SIZE,
we'd be marking the entire folio uptodate without having actually
initialised all the bytes in the page.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c