OSDN Git Service

btrfs: not a disk error if the bio_add_page fails
authorAnand Jain <anand.jain@oracle.com>
Fri, 5 Jan 2018 02:47:07 +0000 (10:47 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:36 +0000 (15:09 +0200)
commit7ef2d6a7228f54f337a6fcb2e40de41bcc826ef2
treef3d14d5a083a3d04e1b3f9527071bda885a82ce3
parent4117f207d4b0d85ab78fec9cb138ed9c2a4b9f20
btrfs: not a disk error if the bio_add_page fails

bio_add_page() can fail for logical reasons as from the bio_add_page()
comments:

/*
 * This will only fail if either bio->bi_vcnt == bio->bi_max_vecs or
 * it's a cloned bio.
 */

Here we have just allocated the bio, so both of those failures can't
occur. So drop the check. We can also drop the error stats for write
error.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c