mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
f2fs: fix missing bio_alloc(1)
For discard commands, we should use bio_alloc(1) in old versions.
Fixes: 373bb0247a ("f2fs: support async discard based on v4.9")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -769,7 +769,7 @@ static int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
bio = f2fs_bio_alloc(0);
|
||||
bio = f2fs_bio_alloc(1);
|
||||
bio->bi_iter.bi_sector = sector;
|
||||
bio->bi_bdev = bdev;
|
||||
bio_set_op_attrs(bio, op, 0);
|
||||
|
||||
Reference in New Issue
Block a user