]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
block: silently error an unsupported barrier bio
authorJens Axboe <jens.axboe@oracle.com>
Tue, 13 Jan 2009 14:28:32 +0000 (15:28 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 30 Jan 2009 11:34:37 +0000 (12:34 +0100)
This fixes a "regression" from 2.6.28, where the barrier probes that file
systems may do would trigger additional end request warnings in dmesg.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-core.c

index 9e2e86fb78b853657e81b145b78a22bc409f0e78..ae75c047f45d41d437765711e5ffaa0e5041de86 100644 (file)
@@ -1451,6 +1451,11 @@ static inline void __generic_make_request(struct bio *bio)
                        err = -EOPNOTSUPP;
                        goto end_io;
                }
+               if (bio_barrier(bio) && bio_has_data(bio) &&
+                   (q->next_ordered == QUEUE_ORDERED_NONE)) {
+                       err = -EOPNOTSUPP;
+                       goto end_io;
+               }
 
                ret = q->make_request_fn(q, bio);
        } while (ret);