]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: make add_pending_csums() to take an ordered extent as parameter
authorQu Wenruo <wqu@suse.com>
Tue, 10 Feb 2026 03:24:30 +0000 (13:54 +1030)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Apr 2026 16:55:56 +0000 (18:55 +0200)
commit00c865b60b0650723e1f103dc58ca3f01e7bd662
tree82c735b2b5098372e0ee425f3552c3e2fe048065
parent09664971b33718680c20f94aaf5d18fc8d7b0a3c
btrfs: make add_pending_csums() to take an ordered extent as parameter

The structure btrfs_ordered_extent has a lot of list heads for different
purposes, passing a random list_head pointer is never a good idea as if
the wrong list is passed in, the type casting along with the fs will be
screwed up.

Instead pass the btrfs_ordered_extent pointer, and grab the csum_list
inside add_pending_csums() to make it a little safer.

Since we're here, also update the comments to follow the current style.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c