From 52c4b177ca5606f09c44abfce8ae81ec93dadd4d Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 6 Dec 2006 20:40:13 -0800 Subject: [PATCH] --- yaml --- r: 42937 b: refs/heads/master c: a8f48a95619cbce8f85423480e7d0a1bf971a62b h: refs/heads/master i: 42935: 4244ef615997de0117ee1f77176d7022fdedf791 v: v3 --- [refs] | 2 +- trunk/fs/ext3/super.c | 6 ++++++ trunk/fs/ext4/super.c | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7a7880904a13..817c241935aa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a0e7688df1484fbf4d6d61c31f7d61a5d8cacf3c +refs/heads/master: a8f48a95619cbce8f85423480e7d0a1bf971a62b diff --git a/trunk/fs/ext3/super.c b/trunk/fs/ext3/super.c index 8ab198133357..580b8a6ca979 100644 --- a/trunk/fs/ext3/super.c +++ b/trunk/fs/ext3/super.c @@ -1264,6 +1264,12 @@ static void ext3_orphan_cleanup (struct super_block * sb, return; } + if (bdev_read_only(sb->s_bdev)) { + printk(KERN_ERR "EXT3-fs: write access " + "unavailable, skipping orphan cleanup.\n"); + return; + } + if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) { if (es->s_last_orphan) jbd_debug(1, "Errors on filesystem, " diff --git a/trunk/fs/ext4/super.c b/trunk/fs/ext4/super.c index 2ede7e2c7019..486a641ca71b 100644 --- a/trunk/fs/ext4/super.c +++ b/trunk/fs/ext4/super.c @@ -1321,6 +1321,12 @@ static void ext4_orphan_cleanup (struct super_block * sb, return; } + if (bdev_read_only(sb->s_bdev)) { + printk(KERN_ERR "EXT4-fs: write access " + "unavailable, skipping orphan cleanup.\n"); + return; + } + if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { if (es->s_last_orphan) jbd_debug(1, "Errors on filesystem, "