diff options
author | Eric W. Biederman <ebiederm@aristanetworks.com> | 2010-05-18 15:58:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-21 12:37:31 -0400 |
commit | 68d75ed4b84a0806ecd4bc14da4759713b23a532 (patch) | |
tree | 025c85987d1d553ed014903ad8f6395250b44fa8 | |
parent | 27eabc7cb4b357c68e4ce77d0b014f7a23add752 (diff) |
sysfs: Remove usage of S_BIAS to avoid merge conflict with the vfs tree
In Al's latest vfs tree the code is reworked and S_BIAS has been removed.
It turns out that checking to see if a super block is in the
middle of an unmount in sysfs_exit_ns is unnecessary because we
remove the super_block from the s_supers/s_instances list before
struct sysfs_super_info pointed to by sb->s_fs_info is freed.
For now just delete the unnecessary check to see if a superblock is in the
middle of an unmount, it isn't necessary with or without Al's changes
and it just causes a needless conflict.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | fs/sysfs/mount.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 1afa32ba242c..281c0c9bc39f 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -138,6 +138,9 @@ static void sysfs_kill_sb(struct super_block *sb) | |||
138 | { | 138 | { |
139 | struct sysfs_super_info *info = sysfs_info(sb); | 139 | struct sysfs_super_info *info = sysfs_info(sb); |
140 | 140 | ||
141 | /* Remove the superblock from fs_supers/s_instances | ||
142 | * so we can't find it, before freeing sysfs_super_info. | ||
143 | */ | ||
141 | kill_anon_super(sb); | 144 | kill_anon_super(sb); |
142 | kfree(info); | 145 | kfree(info); |
143 | } | 146 | } |
@@ -156,9 +159,11 @@ void sysfs_exit_ns(enum kobj_ns_type type, const void *ns) | |||
156 | spin_lock(&sb_lock); | 159 | spin_lock(&sb_lock); |
157 | list_for_each_entry(sb, &sysfs_fs_type.fs_supers, s_instances) { | 160 | list_for_each_entry(sb, &sysfs_fs_type.fs_supers, s_instances) { |
158 | struct sysfs_super_info *info = sysfs_info(sb); | 161 | struct sysfs_super_info *info = sysfs_info(sb); |
159 | /* Ignore superblocks that are in the process of unmounting */ | 162 | /* |
160 | if (sb->s_count <= S_BIAS) | 163 | * If we see a superblock on the fs_supers/s_instances |
161 | continue; | 164 | * list the unmount has not completed and sb->s_fs_info |
165 | * points to a valid struct sysfs_super_info. | ||
166 | */ | ||
162 | /* Ignore superblocks with the wrong ns */ | 167 | /* Ignore superblocks with the wrong ns */ |
163 | if (info->ns[type] != ns) | 168 | if (info->ns[type] != ns) |
164 | continue; | 169 | continue; |