Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208271
b: refs/heads/master
c: f10d9f6
h: refs/heads/master
i:
  208269: 815e2c8
  208267: b49e44d
  208263: ae77c21
  208255: 5a6b796
v: v3
  • Loading branch information
Dave Chinner authored and Jens Axboe committed Aug 7, 2010
1 parent 50960b4 commit 67be290
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2669b19fa4debcdd6a660ace1a124c0900f113e6
refs/heads/master: f10d9f617a65905c556c3b37c9b9646ae7d04ed7
9 changes: 9 additions & 0 deletions trunk/block/blk-barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,15 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
if (!q)
return -ENXIO;

/*
* some block devices may not have their queue correctly set up here
* (e.g. loop device without a backing file) and so issuing a flush
* here will panic. Ensure there is a request function before issuing
* the barrier.
*/
if (!q->make_request_fn)
return -ENXIO;

bio = bio_alloc(gfp_mask, 0);
bio->bi_end_io = bio_end_empty_barrier;
bio->bi_bdev = bdev;
Expand Down

0 comments on commit 67be290

Please sign in to comment.