Whamcloud - gitweb
LU-506 kernel: FC15 - small changes
[fs/lustre-release.git] / lustre / kernel_patches / patches / dev_read_only-2.6.18-vanilla.patch
index b4704a5..39c3b62 100644 (file)
@@ -15,13 +15,13 @@ Index: linux-2.6.18.1/block/ll_rw_blk.c
  
                if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
                        goto end_io;
-+              /* this is cfs's dev_rdonly check */
-+              if (bio->bi_rw == WRITE &&
-+                              dev_check_rdonly(bio->bi_bdev)) {
-+                      bio_endio(bio, bio->bi_size, 0);
-+                      break;
-+              }
+
++               /* this is cfs's dev_rdonly check */
++               if (bio_rw(bio) == WRITE && dev_check_rdonly(bio->bi_bdev)) {
++                       bio_endio(bio, bio->bi_size, 0);
++                       break;
++               }
++
                /*
                 * If this device has partitions, remap block n
 @@ -3765,6 +3773,91 @@ void swap_io_context(struct io_context *