]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix a memory allocation failure test in btrfs_submit_direct
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 30 Oct 2022 07:35:28 +0000 (08:35 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 31 Oct 2022 15:50:15 +0000 (16:50 +0100)
commitd198b24a41420d322feff4388c95f1cb96d4440e
treeef8a3c348236025ca8c3b63c5d5f3cab9631cc81
parentddd59316c680c2865278ad04be2e2b279563d016
btrfs: fix a memory allocation failure test in btrfs_submit_direct

After allocation 'dip' is tested instead of 'dip->csums'.  Fix it.

Fixes: 37b562d495cf ("btrfs: allocate the btrfs_dio_private as part of the iomap dio bio")
CC: stable@vger.kernel.org # 5.19+
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c