Skip to contentSkip to conversation

2.4.5 + ReiserFS + SMP + umount = oops

DISCUSSION Ed Tomlinson 1 participant 1 message May 27, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

This was reported on the reiserfs list yesterday. Seems that the cleanup applied late in 2.4.5-pre affected the locking of the umount process. This was posted to fix the problem.

Ed Tomlinson

-----------------------

Quoted 5 lines · Vladimir V. Saveliev

Hi

Quoted 1 line · Gergely Tamas
Quoted 9 lines
Quoted 5 lines

Hi!

Kernel is 2.4.5

I've tried to unmount a reiserfs device (/uu.new) and got a segfault.

Well, sys_umount in 2.4.5 changed to not lock_kernel() at the beginning and to not unlock_kernel() at the end correspondingly. journal_begin expectes kernel locked and it oopses when it is not. Maybe reiserfs_put_super should lock_kernel () itself?

Hi,

You are right.
It seems, the next patch can fix umount reiserfs bug in linux-2.4.5 :

fs/reiserfs/super.c Sat May 26 19:10:16 2001 renamed from fs/reiserfs/super.c Sun Apr 29 16:02:25 2001 +2 -1
diff -urN v2.4.5/fs/reiserfs/super.c linux/fs/reiserfs/super.c
@@ -104,7 +104,8 @@
 {
   int i;
   struct reiserfs_transaction_handle th ;
-  
+
+  lock_kernel() ;  
   /* change file system state to current state if it was mounted with

read-write permissions */

   if (!(s->s_flags & MS_RDONLY)) {
     journal_begin(&th, s, 10) ;

@@ -117,6 +118,7 @@
** to do a journal_end
*/
journal_release(&th, s) ;
+ unlock_kernel() ;

   for (i = 0; i < SB_BMAP_NR (s); i ++)
     brelse (SB_AP_BITMAP (s)[i]);

Thanks,
Yura.