From: Jan Blunck <jblunck@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: Erez Zadok <ezk@cs.sunysb.edu>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mmotm] fs/sysfs/file.c d_path fix
Date: Mon, 18 Feb 2008 17:44:25 +0100 [thread overview]
Message-ID: <20080218164425.GC26915@hasse.suse.de> (raw)
In-Reply-To: <20080217130733.GA11483@infradead.org>
On Sun, Feb 17, Christoph Hellwig wrote:
> On Sat, Feb 16, 2008 at 02:12:05PM -0500, Erez Zadok wrote:
> > diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> > index 02223e2..a57b024 100644
> > --- a/fs/sysfs/file.c
> > +++ b/fs/sysfs/file.c
> > @@ -329,9 +329,11 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
> > struct sysfs_ops *ops;
> > int error = -EACCES;
> > char *p;
> > + struct path sysfs_path;
> >
> > - p = d_path(file->f_dentry, sysfs_mount, last_sysfs_file,
> > - sizeof(last_sysfs_file));
> > + sysfs_path.dentry = file->f_dentry;
> > + sysfs_path.mnt = sysfs_mount;
> > + p = d_path(&sysfs_path, last_sysfs_file, sizeof(last_sysfs_file));
>
> A d_path(file->f_path, ..); should do it, but I'd really like to know
> what sysfs crowd was smoking when adding a d_path in ->open. Guys,
> please explain what's going on here.
>
This is from gregkh-driver-sysfs-crash-debugging.patch which is only in -mm I
guess.
prev parent reply other threads:[~2008-02-18 16:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-16 19:12 Erez Zadok
2008-02-17 13:07 ` Christoph Hellwig
2008-02-18 16:44 ` Jan Blunck [this message]
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=20080218164425.GC26915@hasse.suse.de \
--to=jblunck@suse.de \
--cc=akpm@linux-foundation.org \
--cc=ezk@cs.sunysb.edu \
--cc=hch@infradead.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®