mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
blkdev: generalize flags for blkdev_issue_fn functions
The patch just convert all blkdev_issue_xxx function to common set of flags. Wait/allocation semantics preserved. Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
6b4517a791
commit
fbd9b09a17
15 changed files with 55 additions and 34 deletions
|
|
@ -139,7 +139,8 @@ 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, DISCARD_FL_BARRIER);
|
||||
nr_blocks, GFP_KERNEL,
|
||||
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
|
||||
if (err)
|
||||
return err;
|
||||
cond_resched();
|
||||
|
|
@ -150,7 +151,8 @@ 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, DISCARD_FL_BARRIER);
|
||||
nr_blocks, GFP_KERNEL,
|
||||
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
|
|
@ -189,7 +191,8 @@ 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, DISCARD_FL_BARRIER))
|
||||
nr_blocks, GFP_NOIO, BLKDEV_IFL_WAIT |
|
||||
BLKDEV_IFL_BARRIER))
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue