rpms/kernel/devel linux-2.6-ext4-extent-mount-check.patch, NONE, 1.1 kernel.spec, 1.380, 1.381

Eric Sandeen (sandeen) fedora-extras-commits at redhat.com
Wed Jan 23 21:30:00 UTC 2008


Author: sandeen

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22664

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-ext4-extent-mount-check.patch 
Log Message:
* Wed Jan 23 2008 Eric Sandeen <sandeen at redhat.com>
- When probing for root fs, don't mount ext3 as ext4dev;
  if the extents flag is not set, refuse. (#429782)


linux-2.6-ext4-extent-mount-check.patch:

--- NEW FILE linux-2.6-ext4-extent-mount-check.patch ---
Index: linux-2.6.23.noarch/fs/ext4/super.c
===================================================================
--- linux-2.6.23.noarch.orig/fs/ext4/super.c
+++ linux-2.6.23.noarch/fs/ext4/super.c
@@ -1863,6 +1864,15 @@ static int ext4_fill_super (struct super
 	if (sb->s_magic != EXT4_SUPER_MAGIC)
 		goto cantfind_ext4;
 
+	/*
+ 	 * XXX ERS temporary, to stop ext3 from mounting as ext4
+ 	 * If probing for root (silent==1) and no extents on fs,
+ 	 * don't mount this as ext4.
+ 	 */
+	if (silent &&
+	    !EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_EXTENTS))
+		goto cantfind_ext4;
+
 	/* Set defaults before we parse the mount options */
 	def_mount_opts = le32_to_cpu(es->s_default_mount_opts);
 	if (def_mount_opts & EXT4_DEFM_DEBUG)


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -r1.380 -r1.381
--- kernel.spec	23 Jan 2008 21:03:41 -0000	1.380
+++ kernel.spec	23 Jan 2008 21:29:18 -0000	1.381
@@ -653,6 +653,7 @@
 # supporting files, and ext4/jbd2 core files
 Patch2100: linux-2.6-ext4-jbd2-support-patch-queue.patch
 Patch2101: linux-2.6-ext4-jbd2-patch-queue.patch
+Patch2102: linux-2.6-ext4-extent-mount-check.patch
 
 # linux1394 git patches
 Patch2200: linux-2.6-firewire-git-update.patch
@@ -1182,6 +1183,8 @@
 # ext4/jbd2 patches (and support) headed for 2.6.25
 ApplyPatch linux-2.6-ext4-jbd2-support-patch-queue.patch
 ApplyPatch linux-2.6-ext4-jbd2-patch-queue.patch
+# Temporary safety valve to not mount ext3 as ext4 accidentally
+ApplyPatch linux-2.6-ext4-extent-mount-check.patch
 
 # linux1394 git patches
 ApplyPatch linux-2.6-firewire-git-update.patch
@@ -1758,6 +1761,10 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
+* Wed Jan 23 2008 Eric Sandeen <sandeen at redhat.com>
+- When probing for root fs, don't mount ext3 as ext4dev;
+  if the extents flag is not set, refuse. (#429782)
+
 * Wed Jan 23 2008 Kyle McMartin <kmcmartin at redhat.com>
 - Add uvcvideo driver for USB webcams.
 




More information about the fedora-extras-commits mailing list