* Check whether this bio extends beyond the end of the device.
*/
@@ -1517,6 +1519,12 @@ static inline void __generic_make_reques
- if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
- goto end_io;
+ goto end_io;
+ }
+ /* this is cfs's dev_rdonly check */
+ if (bio_rw(bio) == WRITE && dev_check_rdonly(bio->bi_bdev)) {
victim = bdev->bd_contains;
bdev->bd_contains = NULL;
+ dev_clear_rdonly(bdev);
- }
- unlock_kernel();
- mutex_unlock(&bdev->bd_mutex);
+
+ put_disk(disk);
+ module_put(owner);
Index: linux-2.6.32-131.0.15.el6.x86_64/include/linux/fs.h
===================================================================
--- linux-2.6.32-131.0.15.el6.x86_64.orig/include/linux/fs.h 2011-05-10 21:38:29.000000000 +0300