From b0504a3783cc75dbb4890ab53c52723890f7e212 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Fri, 26 Aug 2005 18:34:17 -0700 Subject: [PATCH] --- yaml --- r: 6021 b: refs/heads/master c: 36676bcbf9f6bcbea9d06e67ee8d04eacde54952 h: refs/heads/master i: 6019: 6918bda511a97afe71761aa499f9f1a99e0124d1 v: v3 --- [refs] | 2 +- trunk/fs/sysfs/inode.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index baa77f0cdc24..5deb8bf8de54 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 657390d25d4241705cb4fc5b3b4ba5b30575dc17 +refs/heads/master: 36676bcbf9f6bcbea9d06e67ee8d04eacde54952 diff --git a/trunk/fs/sysfs/inode.c b/trunk/fs/sysfs/inode.c index d727dc960634..970a33f03299 100644 --- a/trunk/fs/sysfs/inode.c +++ b/trunk/fs/sysfs/inode.c @@ -228,6 +228,10 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name) 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)