packages (LINUX_2_6_38): kernel/kernel-small_fixes.patch - fix oops on moun...

arekm arekm at pld-linux.org
Mon Jul 11 17:13:26 CEST 2011


Author: arekm                        Date: Mon Jul 11 15:13:26 2011 GMT
Module: packages                      Tag: LINUX_2_6_38
---- Log message:
- fix oops on mount with quota when mount takes long time

---- Files affected:
packages/kernel:
   kernel-small_fixes.patch (1.25.2.3 -> 1.25.2.4) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-small_fixes.patch
diff -u packages/kernel/kernel-small_fixes.patch:1.25.2.3 packages/kernel/kernel-small_fixes.patch:1.25.2.4
--- packages/kernel/kernel-small_fixes.patch:1.25.2.3	Sun Jun 12 08:32:24 2011
+++ packages/kernel/kernel-small_fixes.patch	Mon Jul 11 17:13:21 2011
@@ -170,3 +170,131 @@
  	int error = 0;
  
  	if (!unconfined(profile))
+From hch at infradead.org Mon Jul 11 15:59:57 2011
+Return-path: <BATV+94d2461b9b43b672e96e+2878+infradead.org+hch at bombadil.srs.infradead.org>
+Envelope-to: arm at mbox4.agnat.pl
+Delivery-date: Mon, 11 Jul 2011 16:00:21 +0200
+Received: from pop3.arm.beep.pl [193.239.44.218]
+	by localhost with IMAP (fetchmail-6.3.20)
+	for <arekm at localhost> (single-drop); Mon, 11 Jul 2011 17:09:36 +0200 (CEST)
+Received: from incoming1.smtp.agnat.pl ([193.239.44.90])
+	by mbox4.agnat.pl with esmtp (Exim 4.76)
+	(envelope-from <BATV+94d2461b9b43b672e96e+2878+infradead.org+hch at bombadil.srs.infradead.org>)
+	id 1QgH23-0007I5-KI
+	for arm at mbox4.agnat.pl; Mon, 11 Jul 2011 16:00:19 +0200
+Received: from [173.166.109.252] (port=39578 helo=bombadil.infradead.org)
+	by incoming1.smtp.agnat.pl with esmtps (TLSv1:DHE-RSA-AES256-SHA:256)
+	(Exim 4.76)
+	(envelope-from <BATV+94d2461b9b43b672e96e+2878+infradead.org+hch at bombadil.srs.infradead.org>)
+	id 1QgH1l-0004B6-8n
+	for arekm at maven.pl; Mon, 11 Jul 2011 16:00:02 +0200
+Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux))
+	id 1QgH1h-0006Bo-Os; Mon, 11 Jul 2011 13:59:57 +0000
+Date: Mon, 11 Jul 2011 09:59:57 -0400
+From: Christoph Hellwig <hch at infradead.org>
+To: xfs at oss.sgi.com
+Cc: arekm at maven.pl
+Subject: [PATCH] xfs: start periodic workers later
+Message-ID: <20110711135957.GA23737 at infradead.org>
+MIME-Version: 1.0
+Content-Type: text/plain;
+  charset=us-ascii
+Content-Disposition: inline
+User-Agent: Mutt/1.5.21 (2010-09-15)
+X-SRS-Rewrite: SMTP reverse-path rewritten from <hch at infradead.org> by bombadil.infradead.org
+	See http://www.infradead.org/rpr.html
+X-Spam-Status: no, score=0.2 required=6.0 (/)
+X-Authenticated-Id:  
+Status: R
+X-Status: N
+X-KMail-EncryptionState:  
+X-KMail-SignatureState:  
+X-KMail-MDN-Sent:  
+
+Start the periodic sync workers only after we have finished xfs_mountfs
+and thus fully set up the filesystem structures.  Without this we can
+call into xfs_qm_sync before the quotainfo strucute is set up if the
+mount takes unusually long, and probably hit other incomplete states
+as well.
+
+Also clean up the xfs_fs_fill_super error path by using consistent
+label names, and removing an impossible to reach case.
+
+Reported-by: Arkadiusz Miskiewicz <arekm at maven.pl>
+Signed-off-by: Christoph Hellwig <hch at lst.de>
+
+Index: xfs/fs/xfs/linux-2.6/xfs_super.c
+===================================================================
+--- xfs.orig/fs/xfs/linux-2.6/xfs_super.c	2011-07-11 12:02:56.762758869 +0200
++++ xfs/fs/xfs/linux-2.6/xfs_super.c	2011-07-11 12:09:20.817344934 +0200
+@@ -1411,37 +1411,35 @@ xfs_fs_fill_super(
+ 	sb->s_time_gran = 1;
+ 	set_posix_acl_flag(sb);
+ 
+-	error = xfs_syncd_init(mp);
+-	if (error)
+-		goto out_filestream_unmount;
+-
+ 	xfs_inode_shrinker_register(mp);
+ 
+ 	error = xfs_mountfs(mp);
+ 	if (error)
+-		goto out_syncd_stop;
++		goto out_filestream_unmount;
++
++	error = xfs_syncd_init(mp);
++	if (error)
++		goto out_unmount;
+ 
+ 	root = igrab(VFS_I(mp->m_rootip));
+ 	if (!root) {
+ 		error = ENOENT;
+-		goto fail_unmount;
++		goto out_syncd_stop;
+ 	}
+ 	if (is_bad_inode(root)) {
+ 		error = EINVAL;
+-		goto fail_vnrele;
++		goto out_syncd_stop;
+ 	}
+ 	sb->s_root = d_alloc_root(root);
+ 	if (!sb->s_root) {
+ 		error = ENOMEM;
+-		goto fail_vnrele;
++		goto out_iput;
+ 	}
+ 
+ 	return 0;
+ 
+- out_syncd_stop:
+-	xfs_inode_shrinker_unregister(mp);
+-	xfs_syncd_stop(mp);
+  out_filestream_unmount:
++	xfs_inode_shrinker_unregister(mp);
+ 	xfs_filestream_unmount(mp);
+  out_free_sb:
+ 	xfs_freesb(mp);
+@@ -1455,17 +1453,12 @@ xfs_fs_fill_super(
+  out:
+ 	return -error;
+ 
+- fail_vnrele:
+-	if (sb->s_root) {
+-		dput(sb->s_root);
+-		sb->s_root = NULL;
+-	} else {
+-		iput(root);
+-	}
+-
+- fail_unmount:
+-	xfs_inode_shrinker_unregister(mp);
++ out_iput:
++	iput(root);
++ out_syncd_stop:
+ 	xfs_syncd_stop(mp);
++ out_unmount:
++	xfs_inode_shrinker_unregister(mp);
+ 
+ 	/*
+ 	 * Blow away any referenced inode in the filestreams cache.
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-small_fixes.patch?r1=1.25.2.3&r2=1.25.2.4&f=u



More information about the pld-cvs-commit mailing list