mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
block: remove BLKDEV_IFL_WAIT
All the blkdev_issue_* helpers can only sanely be used for synchronous caller. To issue cache flushes or barriers asynchronously the caller needs to set up a bio by itself with a completion callback to move the asynchronous state machine ahead. So drop the BLKDEV_IFL_WAIT flag that is always specified when calling blkdev_issue_* and also remove the now unused flags argument to blkdev_issue_flush and blkdev_issue_zeroout. For blkdev_issue_discard we need to keep it for the secure discard flag, which gains a more descriptive name and loses the bitops vs flag confusion. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
8786fb70cc
commit
dd3932eddf
19 changed files with 47 additions and 71 deletions
|
|
@ -141,7 +141,7 @@ static int discard_swap(struct swap_info_struct *si)
|
|||
nr_blocks = ((sector_t)se->nr_pages - 1) << (PAGE_SHIFT - 9);
|
||||
if (nr_blocks) {
|
||||
err = blkdev_issue_discard(si->bdev, start_block,
|
||||
nr_blocks, GFP_KERNEL, BLKDEV_IFL_WAIT);
|
||||
nr_blocks, GFP_KERNEL, 0);
|
||||
if (err)
|
||||
return err;
|
||||
cond_resched();
|
||||
|
|
@ -152,7 +152,7 @@ static int discard_swap(struct swap_info_struct *si)
|
|||
nr_blocks = (sector_t)se->nr_pages << (PAGE_SHIFT - 9);
|
||||
|
||||
err = blkdev_issue_discard(si->bdev, start_block,
|
||||
nr_blocks, GFP_KERNEL, BLKDEV_IFL_WAIT);
|
||||
nr_blocks, GFP_KERNEL, 0);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ static void discard_swap_cluster(struct swap_info_struct *si,
|
|||
start_block <<= PAGE_SHIFT - 9;
|
||||
nr_blocks <<= PAGE_SHIFT - 9;
|
||||
if (blkdev_issue_discard(si->bdev, start_block,
|
||||
nr_blocks, GFP_NOIO, BLKDEV_IFL_WAIT))
|
||||
nr_blocks, GFP_NOIO, 0))
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue