From 8296bc588e20c5bcd1c554805f4f5635d8efce00 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 26 Sep 2012 23:30:12 -0400 Subject: [PATCH] --- yaml --- r: 331608 b: refs/heads/master c: c25f9bc6143f4cb4dc31d2ad7a6fe4e4005fc414 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/super.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 107d2c62b240..4ef8ec0cbc07 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b794e7a6ebfbddb819b0e75ab59ada6b08a285f2 +refs/heads/master: c25f9bc6143f4cb4dc31d2ad7a6fe4e4005fc414 diff --git a/trunk/fs/ext4/super.c b/trunk/fs/ext4/super.c index 7bef0a4bc518..a53a23aef5e3 100644 --- a/trunk/fs/ext4/super.c +++ b/trunk/fs/ext4/super.c @@ -2177,10 +2177,12 @@ static void ext4_orphan_cleanup(struct super_block *sb, } if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { - if (es->s_last_orphan) + /* don't clear list on RO mount w/ errors */ + if (es->s_last_orphan && !(s_flags & MS_RDONLY)) { jbd_debug(1, "Errors on filesystem, " "clearing orphan list.\n"); - es->s_last_orphan = 0; + es->s_last_orphan = 0; + } jbd_debug(1, "Skipping orphan recovery on fs with errors.\n"); return; }