[PATCH] jfs_write_super_lockfs should mark superblock clean (1 of 1)

Dave Kleikamp <[email protected]> Thu, 31 Jul 2003 10:48:59 -0500
Newsgroups gmane.comp.file-systems.jfs.patches
Message-ID <[email protected]>
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1041  -> 1.1042 
#	      fs/jfs/super.c	1.18    -> 1.19   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/07/31	[email protected]	1.1042
# JFS: write_super_lockfs should mark superblock clean
# 
# LVM and EVMS snapshots of JFS filesystems were not mountable because
# write_super_lockfs was not marking the volume as clean.  The volume was
# otherwise in a consistent state.
# --------------------------------------------
#
diff -Nru a/fs/jfs/super.c b/fs/jfs/super.c
--- a/fs/jfs/super.c	Thu Jul 31 10:42:10 2003
+++ b/fs/jfs/super.c	Thu Jul 31 10:42:10 2003
@@ -337,6 +337,7 @@
 	if (!(sb->s_flags & MS_RDONLY)) {
 		txQuiesce(sb);
 		lmLogShutdown(log);
+		updateSuper(sb, FM_CLEAN);
 	}
 }
 
@@ -347,6 +348,7 @@
 	int rc = 0;
 
 	if (!(sb->s_flags & MS_RDONLY)) {
+		updateSuper(sb, FM_MOUNT);
 		if ((rc = lmLogInit(log)))
 			jfs_err("jfs_unlock failed with return code %d", rc);
 		else