diff options
author | Christoph Hellwig <hch@lst.de> | 2010-09-16 14:51:46 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-16 14:52:58 -0400 |
commit | dd3932eddf428571762596e17b65f5dc92ca361b (patch) | |
tree | 57cec5ae2f862037f78b7e993323d77955bb6463 /mm/swapfile.c | |
parent | 8786fb70ccb36c7cff64680bb80c46d3a09d44db (diff) |
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 <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 68cda164dff6..e132e1708acc 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -141,7 +141,7 @@ static int discard_swap(struct swap_info_struct *si) | |||
141 | nr_blocks = ((sector_t)se->nr_pages - 1) << (PAGE_SHIFT - 9); | 141 | nr_blocks = ((sector_t)se->nr_pages - 1) << (PAGE_SHIFT - 9); |
142 | if (nr_blocks) { | 142 | if (nr_blocks) { |
143 | err = blkdev_issue_discard(si->bdev, start_block, | 143 | err = blkdev_issue_discard(si->bdev, start_block, |
144 | nr_blocks, GFP_KERNEL, BLKDEV_IFL_WAIT); | 144 | nr_blocks, GFP_KERNEL, 0); |
145 | if (err) | 145 | if (err) |
146 | return err; | 146 | return err; |
147 | cond_resched(); | 147 | cond_resched(); |
@@ -152,7 +152,7 @@ static int discard_swap(struct swap_info_struct *si) | |||
152 | nr_blocks = (sector_t)se->nr_pages << (PAGE_SHIFT - 9); | 152 | nr_blocks = (sector_t)se->nr_pages << (PAGE_SHIFT - 9); |
153 | 153 | ||
154 | err = blkdev_issue_discard(si->bdev, start_block, | 154 | err = blkdev_issue_discard(si->bdev, start_block, |
155 | nr_blocks, GFP_KERNEL, BLKDEV_IFL_WAIT); | 155 | nr_blocks, GFP_KERNEL, 0); |
156 | if (err) | 156 | if (err) |
157 | break; | 157 | break; |
158 | 158 | ||
@@ -191,7 +191,7 @@ static void discard_swap_cluster(struct swap_info_struct *si, | |||
191 | start_block <<= PAGE_SHIFT - 9; | 191 | start_block <<= PAGE_SHIFT - 9; |
192 | nr_blocks <<= PAGE_SHIFT - 9; | 192 | nr_blocks <<= PAGE_SHIFT - 9; |
193 | if (blkdev_issue_discard(si->bdev, start_block, | 193 | if (blkdev_issue_discard(si->bdev, start_block, |
194 | nr_blocks, GFP_NOIO, BLKDEV_IFL_WAIT)) | 194 | nr_blocks, GFP_NOIO, 0)) |
195 | break; | 195 | break; |
196 | } | 196 | } |
197 | 197 | ||