From: Christoph Hellwig <hch@infradead.org>
To: Erez Zadok <ezk@cs.sunysb.edu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
jblunck@suse.de, hch@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mmotm] fs/sysfs/file.c d_path fix
Date: Sun, 17 Feb 2008 08:07:33 -0500 [thread overview]
Message-ID: <20080217130733.GA11483@infradead.org> (raw)
In-Reply-To: <200802161912.m1GJC5Gt031939@agora.fsl.cs.sunysb.edu>
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.
next prev parent reply other threads:[~2008-02-17 13:07 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 [this message]
2008-02-18 16:44 ` Jan Blunck
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=20080217130733.GA11483@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=ezk@cs.sunysb.edu \
--cc=jblunck@suse.de \
--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®