diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4
index d92ab36e293aa3147c5cd1eaf0dfc9357fd6b5d2..d38eb1d4030d2c9c316cd641429208751da6af29 100644
--- a/build/autoconf/lustre-build-linux.m4
+++ b/build/autoconf/lustre-build-linux.m4
@@ -100,6 +100,7 @@ AC_MSG_RESULT($RELEASE)
 AC_SUBST(RELEASE)
 ])
 
+#
 #
 # LB_LINUX_PATH
 #
@@ -187,6 +188,13 @@ if grep rhconfig $LINUX_OBJ/include/linux/version.h >/dev/null ; then
 	EXTRA_KCFLAGS="-include $KERNEL_SOURCE_HEADER $EXTRA_KCFLAGS"
 fi
 
+# Find the modpost utility
+AC_CHECK_FILE([$LINUX_OBJ/scripts/mod/modpost],
+	[MODPOST=$LINUX_OBJ/scripts/mod/modpost],
+	[AC_MSG_ERROR([modpost not found.])]
+)
+AC_SUBST(MODPOST)
+
 # this is needed before we can build modules
 LB_LINUX_UML
 LB_LINUX_VERSION
@@ -199,11 +207,11 @@ LB_LINUX_TRY_COMPILE([],[],[
 	AC_MSG_RESULT([no])
 	AC_MSG_WARN([Consult config.log for details.])
 	AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult build/README.kernel-source])
-	AC_MSG_ERROR([Kernel modules cannot be build.])
+	AC_MSG_ERROR([Kernel modules cannot be built.])
 ])
 
 LB_LINUX_RELEASE
-])
+]) # end of LB_LINUX_PATH
 
 #
 # LB_LINUX_UML
diff --git a/ldiskfs/ldiskfs/autoMakefile.am b/ldiskfs/ldiskfs/autoMakefile.am
index f7b83ad06bd63a8a51a42a10d5cd34f9f4fa92d8..4377660d3144ebdab9ce75dc4fcde6d7176ada21 100644
--- a/ldiskfs/ldiskfs/autoMakefile.am
+++ b/ldiskfs/ldiskfs/autoMakefile.am
@@ -70,3 +70,11 @@ CLEANFILES = sources $(notdir $(linux_headers) $(ext3_headers) $(ext3_sources) $
 
 clean: clean-am
 	rm -rf linux linux-stage
+
+all: @LINUX_OBJ@/Module.symvers
+
+# Update the kernel's Module.symvers to add ldiskfs symbols before building
+# fsfilt_ldiskfs - see bug 12842.
+@LINUX_OBJ@/Module.symvers: ldiskfs.o
+	$(MODPOST) -m -i @LINUX_OBJ@/Module.symvers \
+		-o @LINUX_OBJ@/Module.symvers ldiskfs.o