--- fs/sysfs/dir.c | 7 +++++-- fs/sysfs/inode.c | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) Index: work1/fs/sysfs/dir.c =================================================================== --- work1.orig/fs/sysfs/dir.c +++ work1/fs/sysfs/dir.c @@ -18,6 +18,8 @@ static void sysfs_d_iput(struct dentry * { struct sysfs_dirent * sd = dentry->d_fsdata; + udelay(10); + if (sd) { BUG_ON(sd->s_dentry != dentry); sd->s_dentry = NULL; @@ -538,9 +540,10 @@ static int sysfs_readdir(struct file * f name = sysfs_get_name(next); len = strlen(name); - if (next->s_dentry) + if (next->s_dentry) { + msleep(1); ino = next->s_dentry->d_inode->i_ino; - else + } else ino = iunique(sysfs_sb, 2); if (filldir(dirent, name, len, filp->f_pos, ino, Index: work1/fs/sysfs/inode.c =================================================================== --- work1.orig/fs/sysfs/inode.c +++ work1/fs/sysfs/inode.c @@ -248,6 +248,8 @@ void sysfs_drop_dentry(struct sysfs_dire struct dentry * dentry = sd->s_dentry; struct inode *inode; + msleep(1); + if (dentry) { spin_lock(&dcache_lock); spin_lock(&dentry->d_lock);