Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196060
b: refs/heads/master
c: 68d75ed
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Greg Kroah-Hartman committed May 21, 2010
1 parent cd1450e commit c752263
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27eabc7cb4b357c68e4ce77d0b014f7a23add752
refs/heads/master: 68d75ed4b84a0806ecd4bc14da4759713b23a532
11 changes: 8 additions & 3 deletions trunk/fs/sysfs/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ static void sysfs_kill_sb(struct super_block *sb)
{
struct sysfs_super_info *info = sysfs_info(sb);

/* Remove the superblock from fs_supers/s_instances
* so we can't find it, before freeing sysfs_super_info.
*/
kill_anon_super(sb);
kfree(info);
}
Expand All @@ -156,9 +159,11 @@ void sysfs_exit_ns(enum kobj_ns_type type, const void *ns)
spin_lock(&sb_lock);
list_for_each_entry(sb, &sysfs_fs_type.fs_supers, s_instances) {
struct sysfs_super_info *info = sysfs_info(sb);
/* Ignore superblocks that are in the process of unmounting */
if (sb->s_count <= S_BIAS)
continue;
/*
* If we see a superblock on the fs_supers/s_instances
* list the unmount has not completed and sb->s_fs_info
* points to a valid struct sysfs_super_info.
*/
/* Ignore superblocks with the wrong ns */
if (info->ns[type] != ns)
continue;
Expand Down

0 comments on commit c752263

Please sign in to comment.