aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/super.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2011-02-26 15:40:19 -0500
committerJan Kara <jack@suse.cz>2011-02-28 15:55:58 -0500
commitce654b37f87980d95f339080e4c3bdb2370bdf22 (patch)
treed1f1f69bd92a0da1b77ee5748f3abe95dd832c49 /fs/ext3/super.c
parent03885ac3c79ab7f3f4a8e502486be2ea6c85c3e3 (diff)
ext3: skip orphan cleanup on rocompat fs
Orphan cleanup is currently executed even if the file system has some number of unknown ROCOMPAT features, which deletes inodes and frees blocks, which could be very bad for some RO_COMPAT features. This patch skips the orphan cleanup if it contains readonly compatible features not known by this ext3 implementation, which would prevent the fs from being mounted (or remounted) readwrite. Signed-off-by: Amir Goldstein <amir73il@users.sf.net> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r--fs/ext3/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 85c8cc8f2473..0d62f29f213a 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -1464,6 +1464,13 @@ static void ext3_orphan_cleanup (struct super_block * sb,
1464 return; 1464 return;
1465 } 1465 }
1466 1466
1467 /* Check if feature set allows readwrite operations */
1468 if (EXT3_HAS_RO_COMPAT_FEATURE(sb, ~EXT3_FEATURE_RO_COMPAT_SUPP)) {
1469 ext3_msg(sb, KERN_INFO, "Skipping orphan cleanup due to "
1470 "unknown ROCOMPAT features");
1471 return;
1472 }
1473
1467 if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) { 1474 if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) {
1468 if (es->s_last_orphan) 1475 if (es->s_last_orphan)
1469 jbd_debug(1, "Errors on filesystem, " 1476 jbd_debug(1, "Errors on filesystem, "