Jadro 2.4.5 a chyba v ReiserFS (Fwd. z linux-kernel na vger.kernel.org)

Milan Kerslager milan.kerslager na spsselib.hiedu.cz
Pondělí Květen 28 13:31:42 CEST 2001


Pokud nekdo chcete pouzivat ReiserFS na jadre 2.4.5, budete potrebovat
nasledujici patch:


---------- Forwarded message ----------
Date: Sun, 27 May 2001 18:22:23 -0400 (EDT)
From: Alexander Viro <viro na math.psu.edu>
To: svbj na online.no
Cc: linux-kernel na vger.kernel.org, Linus Torvalds <torvalds na transmeta.com>,
     Alan Cox <alan na lxorguk.ukuu.org.uk>
Subject: Re: BUG?: 2.4.5 breaks reiserfs (kernel BUG)



On Sun, 27 May 2001, Bjerkeset, Svein Olav wrote:

> Hi,
>
> Today I downloaded kernel 2.4.5 and compiled it. The kernel worked fine
> until
> I tried to halt the computer. When trying to unmount the reiserfs
> filesystems,
> the system freezes with the following output:
>
> journal_begin called without kernel lock held
> kernel BUG at journal.c:423!

	Yes. My fault - badly merged patch in -pre6, actually.
Details:
	* kill_super() gets called without BKL, but doesn't grab BKL around
the calls of ->write_super() and ->put_super()
	* by the time when it calls these methods filesystem is quiet. I.e.
nothing else has a chance to touch its data structures. So actually only
reiserfs (which checks that we hold BKL) had noticed.
	* It _is_ a bug - changing locking rules is for 2.5.

Fix:
--- fs/super.c	Fri May 25 21:51:14 2001
+++ fs/super.c	Sun May 27 00:21:53 2001
@@ -873,6 +873,7 @@
 	}
 	spin_unlock(&dcache_lock);
 	down_write(&sb->s_umount);
+	lock_kernel();
 	sb->s_root = NULL;
 	/* Need to clean after the sucker */
 	if (fs->fs_flags & FS_LITTER)
@@ -901,6 +902,7 @@
 	put_filesystem(fs);
 	sb->s_type = NULL;
 	unlock_super(sb);
+	unlock_kernel();
 	up_write(&sb->s_umount);
 	if (bdev) {
 		blkdev_put(bdev, BDEV_FS);

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



Další informace o konferenci Linux