+       if (bio_check_ro(bio)) {

I'd place unlikely statement here, but other than that, looks good to me

Reviewed-by: Sagi Grimberg <[email protected]>

+               printk(KERN_ERR
+                      "generic_make_request: Trying to write "
+                       "to read-only block-device %s (partno %d)\n",
+                       bio_devname(bio, b), bio->bi_partno);
+               goto end_io;
+       }
+
        /*
         * For a REQ_NOWAIT based request, return -EOPNOTSUPP
         * if queue is not a request based queue.
         */
-
        if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_rq_based(q))
                goto not_supported;

Reply via email to