From 8077994116824ae55d4b8f9a26971a7d11e089bf Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 14 Jan 2001 18:03:43 +0000 Subject: [PATCH] ChangeLog, closefs.c: closefs.c (ext2fs_flush): Don't write out anything beyond the primary superblock if EXT2_INCOMPAT_JOURNAL_DEV is listed. --- lib/ext2fs/ChangeLog | 6 ++++++ lib/ext2fs/closefs.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index bba8b13..54ef029 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,9 @@ +2001-01-14 Theodore Ts'o + + * closefs.c (ext2fs_flush): Don't write out anything beyond the + primary superblock if EXT2_INCOMPAT_JOURNAL_DEV is + listed. + 2001-01-12 Theodore Ts'o * imager.c: Fix gcc -Wall complaints and a series of bugs where diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c index 9e12550..976062a 100644 --- a/lib/ext2fs/closefs.c +++ b/lib/ext2fs/closefs.c @@ -173,6 +173,16 @@ errcode_t ext2fs_flush(ext2_filsys fs) goto errout; /* + * If this is an external journal device, don't write out the + * block group descriptors or any of the backup superblocks + */ + if (fs->super->s_feature_incompat & + EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) { + retval = 0; + goto errout; + } + + /* * Set the state of the FS to be non-valid. (The state has * already been backed up earlier, and will be restored when * we exit.) -- 1.8.3.1