From: James Bottomley <James.Bottomley@SteelEye.com>
To: Greg KH <greg@kroah.com>
Cc: James.Smart@Emulex.Com, Andrew Morton <akpm@osdl.org>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] add transport class symlink to device object
Date: Sat, 13 Aug 2005 20:37:06 -0500 [thread overview]
Message-ID: <1123983426.5115.32.camel@mulgrave> (raw)
In-Reply-To: <1123980143.5115.27.camel@mulgrave>
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)
next prev parent reply other threads:[~2005-08-14 1:37 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-13 15:34 [PATCH] add transport class symlink to device object James.Smart
2005-08-13 21:39 ` Greg KH
2005-08-13 23:36 ` James Bottomley
2005-08-14 0:42 ` James Bottomley
2005-08-14 1:37 ` James Bottomley [this message]
2005-08-14 15:02 ` Matthew Wilcox
2005-08-14 22:25 ` Russell King
2005-08-15 0:43 ` Matthew Wilcox
2005-08-15 8:32 ` Russell King
2005-08-18 5:21 ` Greg KH
2005-08-18 6:30 ` Russell King
2005-08-18 6:41 ` Greg KH
2005-08-18 6:50 ` Russell King
2005-08-18 7:04 ` Greg KH
2005-08-18 11:43 ` Matthew Wilcox
2005-08-15 22:41 ` James Bottomley
2005-08-18 5:23 ` Greg KH
2005-08-18 6:37 ` Greg KH
2005-08-18 19:50 ` Dmitry Torokhov
2005-08-31 21:43 ` Greg KH
2005-09-01 5:57 ` Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2005-08-14 12:42 James.Smart
2005-08-14 14:17 ` James Bottomley
2005-08-16 0:52 James.Smart
2005-08-16 1:08 ` James Bottomley
2005-08-16 13:41 ` Luben Tuikov
2005-08-16 13:37 ` Luben Tuikov
2005-08-16 20:53 ` Russell King
2005-08-16 15:50 James.Smart
2005-08-18 11:31 James.Smart
2005-08-18 11:32 James.Smart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1123983426.5115.32.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=James.Smart@Emulex.Com \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).