lkml.org 
[lkml]   [2002]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fix for get_sb_bdev() bug
	Grr...  When loop in get_sb_bdev() had been switched from
global list of superblock to per-type one, we should have switched
from sb_entry(p) (aka. list_entry(p, struct super_block, s_list)) to
list_entry(p, struct super_block, s_instances).

As it is, we end up with false negatives all the time. I.e.
second mount from the same block device with the same type gices
a new superblock. With obvious nasty results...

Patch below fixes that.

--- C6-0/fs/super.c Fri Mar 8 19:01:07 2002
+++ C6-0/fs/super.c.fix Mon Mar 11 01:22:26 2002
@@ -728,7 +728,8 @@
spin_lock(&sb_lock);

list_for_each(p, &fs_type->fs_supers) {
- struct super_block *old = sb_entry(p);
+ struct super_block *old;
+ old = list_entry(p, struct super_block, s_instances);
if (old->s_bdev != bdev)
continue;
if (!grab_super(old))
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.034 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site