Whamcloud - gitweb
LU-506 kernel: FC15 - small changes
[fs/lustre-release.git] / lustre / kernel_patches / patches / dev_read_only-2.6.27-vanilla.patch
index 579614f..de7804d 100644 (file)
@@ -15,13 +15,13 @@ Index: linux-2.6.27.21-0.1/block/blk-core.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, 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 (should_fail_request(bio))
                        goto end_io;
 @@ -2189,6 +2197,91 @@