Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Sat, 3 Nov 2007 19:43:36 +0000 (12:43 -0700)]
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  [BLOCK] Don't allow empty barriers to be passed down to queues that don't grok them
  dm: bounce_pfn limit added
  Deadline iosched: Fix batching fairness
  Deadline iosched: Reset batch for ordered requests
  Deadline iosched: Factor out finding latter reques

1  2 
block/ll_rw_blk.c

diff --combined block/ll_rw_blk.c
@@@ -1369,7 -1369,7 +1369,7 @@@ new_segment
        } /* segments in rq */
  
        if (sg)
 -              __sg_mark_end(sg);
 +              sg_mark_end(sg);
  
        return nsegs;
  }
@@@ -3221,6 -3221,7 +3221,7 @@@ static inline void __generic_make_reque
        sector_t old_sector;
        int ret, nr_sectors = bio_sectors(bio);
        dev_t old_dev;
+       int err = -EIO;
  
        might_sleep();
  
                                bdevname(bio->bi_bdev, b),
                                (long long) bio->bi_sector);
  end_io:
-                       bio_endio(bio, -EIO);
+                       bio_endio(bio, err);
                        break;
                }
  
  
                if (bio_check_eod(bio, nr_sectors))
                        goto end_io;
+               if (bio_empty_barrier(bio) && !q->prepare_flush_fn) {
+                       err = -EOPNOTSUPP;
+                       goto end_io;
+               }
  
                ret = q->make_request_fn(q, bio);
        } while (ret);