Re: 2.1.95 - umount freeze & fix

Daniel Nash (danash@students.wisc.edu)
Mon, 13 Apr 1998 19:56:55 -0500


At 01:09 AM 4/13/98 -0600, Sean Connor wrote:
>On Mon, Apr 13, 1998 at 01:14:27AM -0500, Daniel Nash wrote:
>
...
>> Most of the time (I'll get to that), umount freezes when
>> used on any filesystem.
...
>>
>> Any suggestions? I'm out of ideas.
>
>I replaced fs/super.c with the version from 2.1.93. This seems to have
>stopped the freezes.

Ah, I figured it out from that. fs/super.c was changed to have it lock the
superblock while the filesystem put_super was called. However, most of the
filesystems still lock the superblock themselves, mainly except for ext2
and read-only filesystems. At least here, that made fat, isofs, and proc
freeze the umount call.

Here's the (very simple) fix for fat, isofs and proc. My 2.1.95 is now
stable. Many other filesystems need fixing, but someone who uses them
should test deleting the appropriate lines.

*** /fs/fat/inode.c Wed Jan 21 19:46:56 1998
--- /fs/fat/inode.c~ Mon Apr 13 19:09:32 1998
***************
*** 72,78 ****

void fat_put_super(struct super_block *sb)
{
- lock_super(sb);
if (MSDOS_SB(sb)->cvf_format) {

dec_cvf_format_use_count_by_version(MSDOS_SB(sb)->cvf_format->cvf_version);
MSDOS_SB(sb)->cvf_format->unmount_cvf(sb);
--- 72,77 ----
***************
*** 100,106 ****
MSDOS_SB(sb)->options.iocharset = NULL;
}
sb->s_dev = 0;
- unlock_super(sb);
MOD_DEC_USE_COUNT;
return;
}
--- 99,104 ----
*** /fs/isofs/inode.c Sat Feb 21 15:19:29 1998
--- /fs/isofs/inode.c~ Mon Apr 13 19:09:08 1998
***************
*** 49,62 ****
sb->u.isofs_sb.s_nls_iocharset = NULL;
}
#endif
- lock_super(sb);

#ifdef LEAK_CHECK
printk("Outstanding mallocs:%d, outstanding buffers: %d\n",
check_malloc, check_bread);
#endif
sb->s_dev = 0;
- unlock_super(sb);
MOD_DEC_USE_COUNT;
return;
}
--- 49,60 ----
*** /fs/proc/inode.c Wed Apr 1 19:32:39 1998
--- /fs/proc/inode.c~ Mon Apr 13 19:11:50 1998
***************
*** 82,90 ****

static void proc_put_super(struct super_block *sb)
{
- lock_super(sb);
sb->s_dev = 0;
- unlock_super(sb);
}

static struct super_operations proc_sops = {
--- 82,88 ----

Daniel Nash
"Waiter, waiter, there's an avocado in my guacamole!!"

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu