From: David Chinner <dgc@sgi.com>
To: Lachlan McIlroy <lachlan@sgi.com>
Cc: David Chinner <dgc@sgi.com>, xfs-dev <xfs-dev@sgi.com>,
xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs_dm_rdwr() needs to pass a vfsmount to dentry_open()
Date: Fri, 16 May 2008 13:51:08 +1000 [thread overview]
Message-ID: <20080516035108.GF155679365@sgi.com> (raw)
In-Reply-To: <482CEE1F.9050105@sgi.com>
On Fri, May 16, 2008 at 12:14:55PM +1000, Lachlan McIlroy wrote:
> David Chinner wrote:
> >On Fri, May 16, 2008 at 11:30:07AM +1000, Lachlan McIlroy wrote:
> >>There's a new check added to dentry_open():
> >>
> >> if (!mnt) {
> >> printk(KERN_WARNING "%s called with NULL vfsmount\n", __func__);
> >> dump_stack();
> >> return ERR_PTR(-EINVAL);
> >> }
> >>
> >>We need to pass a mountpoint in the call to dentry_open() in xfs_dm_rdwr()
> >>to avoid this code.
> >>
> >>--- fs/xfs/dmapi/xfs_dm.c_1.72 2008-05-15 13:23:41.000000000 +1000
> >>+++ fs/xfs/dmapi/xfs_dm.c 2008-05-15 17:51:41.000000000 +1000
> >>@@ -52,6 +52,8 @@
> >>#include <dmapi_kern.h>
> >>#include "xfs_dm.h"
> >>
> >>+#include <linux/mount.h>
> >
> >Should be defined in fs/xfs/linux-2.6/xfs_linux.h, right?
> It's not currently in xfs_linux.h. It's needed for mntget(). I saw that
> xfs_ioctl.c uses mntget() and pulls in linux/mount.h directly so I followed
> suit. I can add it to xfs_linux.h if you prefer.
Typically we include linux specific headers in code outside fs/xfs/linux-2.6
via an implicit include (xfs.h pulls in linux-2.6/xfs_linux.h) to try and
keep platform specific headers out of the core code. Whether that rule applies
to dmapi is a good question - the dmapi code needs so much cleaning up
anyway I'm not sure it matters.....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2008-05-16 3:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-16 1:30 [PATCH] xfs_dm_rdwr() needs to pass a vfsmount to dentry_open() Lachlan McIlroy
2008-05-16 1:58 ` David Chinner
2008-05-16 2:14 ` Lachlan McIlroy
2008-05-16 3:51 ` David Chinner [this message]
2008-05-16 5:10 ` Christoph Hellwig
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=20080516035108.GF155679365@sgi.com \
--to=dgc@sgi.com \
--cc=lachlan@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/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