ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexander Bokovoy <a.bokovoy@sam-solutions.net>
To: mandrake-russian@altlinux.ru
Subject: [mdk-re] Re: [sisyphus] kernel 2.4.15 -- осторожно!
Date: Mon Nov 26 17:03:03 2001
Message-ID: <20011126134846.GN25753@pc152.belcaf.minsk.by> (raw)
In-Reply-To: <3C022178.D0E4B163@altlinux.ru>

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

On Mon, Nov 26, 2001 at 02:03:20PM +0300, Aleksey Novodvorsky wrote:
> Konstantin Volckov wrote:
> 
> > начиная с 2.4.15-pre9, в то время как ядро, которое сейчас лежит в
> > Sisyphus, основано на 2.4.15-pre6. Тесты тоже не выявили этой ошибки -
> > следовательно повода для паники нет :-)
> 
> > В следующих ядрах, ес-но, эта
> > ошибка будет учтена.
> Хм. Может, не надо ? :-)
:-) не надо. Патч от Александра Виро прилагается, он вошел в 2.4.16.
-- 
/ Alexander Bokovoy
$ cat /proc/identity >~/.signature
  `Senior software developer and analyst for SaM-Solutions Ltd.`
---
Nov 21 20:58:58 alconost kernel: VFS: Busy inodes after unmount. 
		    Self-destruct in 5 seconds.  Have a nice day...

[-- Attachment #2: 2.4.15-inode.c.patch --]
[-- Type: text/plain, Size: 4711 bytes --]

>From linux-kernel-owner@vger.kernel.org Fri Nov 23 17:09:02 2001
Return-Path: <linux-kernel-owner@vger.kernel.org>
Delivered-To: khromy@lnuxlab.ath.cx
Received: from vger.kernel.org (vger.kernel.org [199.183.24.194])
	by lnuxlab.ath.cx (Postfix) with ESMTP id 26CFE1EBA
	for <khromy@lnuxlab.ath.cx>; Fri, 23 Nov 2001 17:09:01 -0500 (EST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id <S282269AbRKWWHQ>; Fri, 23 Nov 2001 17:07:16 -0500
Received: (majordomo@vger.kernel.org) by vger.kernel.org
	id <S282266AbRKWWHJ>; Fri, 23 Nov 2001 17:07:09 -0500
Received: from leibniz.math.psu.edu ([146.186.130.2]:60146 "EHLO math.psu.edu")
	by vger.kernel.org with ESMTP id <S282258AbRKWWGw>;
	Fri, 23 Nov 2001 17:06:52 -0500
Received: from weyl.math.psu.edu (weyl.math.psu.edu [146.186.130.226])
	by math.psu.edu (8.9.3/8.9.3) with ESMTP id RAA05961;
	Fri, 23 Nov 2001 17:06:46 -0500 (EST)
Received: from localhost (viro@localhost)
	by weyl.math.psu.edu (8.9.3/8.9.3) with ESMTP id RAA03766;
	Fri, 23 Nov 2001 17:06:46 -0500 (EST)
X-Authentication-Warning: weyl.math.psu.edu: viro owned process doing -bs
Date:	Fri, 23 Nov 2001 17:06:46 -0500 (EST)
From: Alexander Viro <viro@math.psu.edu>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [PATCH][CFT] Re: 2.4.15-pre9 breakage (inode.c)
In-Reply-To: <Pine.GSO.4.21.0111231634310.2422-100000@weyl.math.psu.edu>
Message-ID: <Pine.GSO.4.21.0111231701440.2422-100000@weyl.math.psu.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
X-Mailing-List:	linux-kernel@vger.kernel.org
Status: RO
Content-Length: 2963
Lines: 101



On Fri, 23 Nov 2001, Alexander Viro wrote:

> 	Untested fix follows.  And please, pass the brown paperbag... ;-/

... and now for something that really builds:

diff -urN S15/fs/inode.c S15-fix/fs/inode.c
--- S15/fs/inode.c	Fri Nov 23 06:45:43 2001
+++ S15-fix/fs/inode.c	Fri Nov 23 17:04:05 2001
@@ -1065,24 +1065,27 @@
 			if (inode->i_state != I_CLEAR)
 				BUG();
 		} else {
-			if (!list_empty(&inode->i_hash) && sb && sb->s_root) {
+			if (!list_empty(&inode->i_hash)) {
 				if (!(inode->i_state & (I_DIRTY|I_LOCK))) {
 					list_del(&inode->i_list);
 					list_add(&inode->i_list, &inode_unused);
 				}
 				inodes_stat.nr_unused++;
 				spin_unlock(&inode_lock);
-				return;
-			} else {
-				list_del_init(&inode->i_list);
+				if (!sb || sb->s_flags & MS_ACTIVE)
+					return;
+				write_inode_now(inode, 1);
+				spin_lock(&inode_lock);
+				inodes_stat.nr_unused--;
 				list_del_init(&inode->i_hash);
-				inode->i_state|=I_FREEING;
-				inodes_stat.nr_inodes--;
-				spin_unlock(&inode_lock);
-				if (inode->i_data.nrpages)
-					truncate_inode_pages(&inode->i_data, 0);
-				clear_inode(inode);
 			}
+			list_del_init(&inode->i_list);
+			inode->i_state|=I_FREEING;
+			inodes_stat.nr_inodes--;
+			spin_unlock(&inode_lock);
+			if (inode->i_data.nrpages)
+				truncate_inode_pages(&inode->i_data, 0);
+			clear_inode(inode);
 		}
 		destroy_inode(inode);
 	}
diff -urN S15/fs/super.c S15-fix/fs/super.c
--- S15/fs/super.c	Fri Nov 23 06:45:43 2001
+++ S15-fix/fs/super.c	Fri Nov 23 16:56:50 2001
@@ -462,6 +462,7 @@
 	lock_super(s);
 	if (!type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
 		goto out_fail;
+	s->s_flags |= MS_ACTIVE;
 	unlock_super(s);
 	/* tell bdcache that we are going to keep this one */
 	if (bdev)
@@ -614,6 +615,7 @@
 	lock_super(s);
 	if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
 		goto out_fail;
+	s->s_flags |= MS_ACTIVE;
 	unlock_super(s);
 	get_filesystem(fs_type);
 	path_release(&nd);
@@ -695,6 +697,7 @@
 		lock_super(s);
 		if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
 			goto out_fail;
+		s->s_flags |= MS_ACTIVE;
 		unlock_super(s);
 		get_filesystem(fs_type);
 		return s;
@@ -739,6 +742,7 @@
 	dput(root);
 	fsync_super(sb);
 	lock_super(sb);
+	sb->s_flags &= ~MS_ACTIVE;
 	invalidate_inodes(sb);	/* bad name - it should be evict_inodes() */
 	if (sop) {
 		if (sop->write_super && sb->s_dirt)
diff -urN S15/include/linux/fs.h S15-fix/include/linux/fs.h
--- S15/include/linux/fs.h	Fri Nov 23 06:45:44 2001
+++ S15-fix/include/linux/fs.h	Fri Nov 23 17:01:18 2001
@@ -110,6 +110,7 @@
 #define MS_BIND		4096
 #define MS_REC		16384
 #define MS_VERBOSE	32768
+#define MS_ACTIVE	(1<<30)
 #define MS_NOUSER	(1<<31)
 
 /*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2001-11-26 17:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-26 13:20 ` Konstantin Volckov
2001-11-26 13:51   ` Aleksey Novodvorsky
2001-11-26 17:03     ` Alexander Bokovoy [this message]
2001-11-26 15:07   ` [mdk-re] " Sergey Krivulja
2001-11-26 15:27   ` SilverFox
2001-11-27 11:52     ` Konstantin Volckov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011126134846.GN25753@pc152.belcaf.minsk.by \
    --to=a.bokovoy@sam-solutions.net \
    --cc=mandrake-russian@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git