diff options
author | Jens Axboe <axboe@fb.com> | 2014-10-01 22:37:25 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-10-01 22:37:25 +0200 |
commit | 7b7b7f7e024460cb7d77f8f96b6eb1a8803f94d9 (patch) | |
tree | 583a7ddbce585533da0077e84c93f449be73316d /drivers/block/xen-blkfront.c | |
parent | rsxx: Remove deprecated IRQF_DISABLED (diff) | |
parent | xen, blkfront: factor out flush-related checks from do_blkif_request() (diff) | |
download | linux-7b7b7f7e024460cb7d77f8f96b6eb1a8803f94d9.tar.xz linux-7b7b7f7e024460cb7d77f8f96b6eb1a8803f94d9.zip |
Merge branch 'stable/for-jens-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-3.18/drivers
Konrad writes:
This pull has two fixes and one cleanup. Nothing earthshattering.
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r-- | drivers/block/xen-blkfront.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 5deb235bd18f..6fc056ed1efd 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -582,6 +582,14 @@ static inline void flush_requests(struct blkfront_info *info) notify_remote_via_irq(info->irq); } +static inline bool blkif_request_flush_valid(struct request *req, + struct blkfront_info *info) +{ + return ((req->cmd_type != REQ_TYPE_FS) || + ((req->cmd_flags & (REQ_FLUSH | REQ_FUA)) && + !info->flush_op)); +} + /* * do_blkif_request * read a block; request is in a request queue @@ -604,9 +612,7 @@ static void do_blkif_request(struct request_queue *rq) blk_start_request(req); - if ((req->cmd_type != REQ_TYPE_FS) || - ((req->cmd_flags & (REQ_FLUSH | REQ_FUA)) && - !info->flush_op)) { + if (blkif_request_flush_valid(req, info)) { __blk_end_request_all(req, -EIO); continue; } |