aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtd_blkdevs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r--drivers/mtd/mtd_blkdevs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 03e19c1965cc..475af42745cb 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -73,14 +73,14 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr,
73 73
74 buf = req->buffer; 74 buf = req->buffer;
75 75
76 if (!blk_fs_request(req)) 76 if (req->cmd_type != REQ_TYPE_FS)
77 return -EIO; 77 return -EIO;
78 78
79 if (blk_rq_pos(req) + blk_rq_cur_sectors(req) > 79 if (blk_rq_pos(req) + blk_rq_cur_sectors(req) >
80 get_capacity(req->rq_disk)) 80 get_capacity(req->rq_disk))
81 return -EIO; 81 return -EIO;
82 82
83 if (blk_discard_rq(req)) 83 if (req->cmd_flags & REQ_DISCARD)
84 return tr->discard(dev, block, nsect); 84 return tr->discard(dev, block, nsect);
85 85
86 switch(rq_data_dir(req)) { 86 switch(rq_data_dir(req)) {