On Sat, 2005-08-13 at 19:42 -0500, James Bottomley wrote: > I'll look into it. OK, I think this fix will work for either patch. The problem is that if the class hasn't been made visible, then the dentry has no inode, so in that case we can just exit out of sysfs_hash_and_remove(). Someone needs to check this though ... I've ventured further into sysfs than a sane person ought to go. In fact if I don't leave now, Mr. Flibble's going to be very cross ... James diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -228,6 +228,10 @@ void sysfs_hash_and_remove(struct dentry struct sysfs_dirent * sd; struct sysfs_dirent * parent_sd = dir->d_fsdata; + if (dir->d_inode == NULL) + /* no inode means this hasn't been made visible yet */ + return; + down(&dir->d_inode->i_sem); list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { if (!sd->s_element) - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html