--- fs/sysfs/dir.c | 8 ++++++++ 1 file changed, 8 insertions(+) Index: tree0/fs/sysfs/dir.c =================================================================== --- tree0.orig/fs/sysfs/dir.c +++ tree0/fs/sysfs/dir.c @@ -268,6 +268,9 @@ static void sysfs_deactivate(struct sysf DECLARE_COMPLETION_ONSTACK(wait); int v; + if (sd->s_sibling || !(sd->s_flags & SYSFS_FLAG_REMOVED)) + printk("XXX sysfs_deactivate: sd=%p s_sibling=%p s_flags=0x%x\n", + sd, sd->s_sibling, sd->s_flags); BUG_ON(sd->s_sibling || !(sd->s_flags & SYSFS_FLAG_REMOVED)); sd->s_sibling = (void *)&wait; @@ -530,6 +533,9 @@ void sysfs_remove_one(struct sysfs_addrm drop_nlink(acxt->parent_inode); acxt->cnt++; + + printk("XXX sysfs_remove_one: acxt=%p sd=%p s_flags=0x%x cnt=%d\n", + acxt, sd, sd->s_flags, acxt->cnt); } /** @@ -624,6 +630,8 @@ int sysfs_addrm_finish(struct sysfs_addr acxt->removed = sd->s_sibling; sd->s_sibling = NULL; + printk("XXX sysfs_addrm_finish: acxt=%p sd=%p s_sibling=%p s_flags=0x%x\n", + acxt, sd, sd->s_sibling, sd->s_flags); sysfs_drop_dentry(sd); sysfs_deactivate(sd); sysfs_put(sd);