diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-08-18 05:29:10 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-10 06:35:38 -0400 |
commit | 2cf6d26a354ab6362e301b5a323832b02867df47 (patch) | |
tree | dcc84f3422df777baa85f54870cda613262e74ca /include/linux/blkdev.h | |
parent | b372d360df6deaf79a58a02fa0cc0d7e0aa3e92f (diff) |
block: pass gfp_mask and flags to sb_issue_discard
We'll need to get rid of the BLKDEV_IFL_BARRIER flag, and to facilitate
that and to make the interface less confusing pass all flags explicitly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8ef705f800ab..6b305eb4a343 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -881,13 +881,12 @@ extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector, | |||
881 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); | 881 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); |
882 | extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector, | 882 | extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector, |
883 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); | 883 | sector_t nr_sects, gfp_t gfp_mask, unsigned long flags); |
884 | static inline int sb_issue_discard(struct super_block *sb, | 884 | static inline int sb_issue_discard(struct super_block *sb, sector_t block, |
885 | sector_t block, sector_t nr_blocks) | 885 | sector_t nr_blocks, gfp_t gfp_mask, unsigned long flags) |
886 | { | 886 | { |
887 | block <<= (sb->s_blocksize_bits - 9); | 887 | return blkdev_issue_discard(sb->s_bdev, block << (sb->s_blocksize_bits - 9), |
888 | nr_blocks <<= (sb->s_blocksize_bits - 9); | 888 | nr_blocks << (sb->s_blocksize_bits - 9), |
889 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_NOFS, | 889 | gfp_mask, flags); |
890 | BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER); | ||
891 | } | 890 | } |
892 | 891 | ||
893 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); | 892 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |