From: Ian Kent <raven@themaw.net>
To: David Howells <dhowells@redhat.com>
Cc: autofs@linux.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: autofs4_d_automount() can change path->dentry param
Date: Mon, 17 Jan 2011 08:07:11 +0800 [thread overview]
Message-ID: <1295222831.2795.5.camel@perseus> (raw)
In-Reply-To: <18985.1295089862@redhat.com>
On Sat, 2011-01-15 at 11:11 +0000, David Howells wrote:
> Hi Ian,
>
> I've just noticed that autofs4_d_automount() can change the dentry pointer in
> the path parameter (via autofs4_mountpoint_changed()). Is this just doing a
> straight substitution of one dentry for its equivalent? I don't think it'll
> be a problem for follow_automount() and follow_managed(), provided the dentry
> stays in the same namespace - but if we eliminate the vfsmount pointer and
> just pass the dentry pointer in to d_automount(), you won't be able to do this
> anymore. Would it work to simply return NULL here and hope the recheck picks
> up the substitution?
I don't think so.
It happens if the mount point dentry is removed and recreated during a
callback to the daemon so a d_lookup() then returns the replacement
dentry. If the vfsmount isn't available we would need to be able to
return the new dentry in much the same as ->lookup() will use a
replacement dentry if it is returned. I guess that's still a problem if
we need to return a vfsmount or ERR_PTR or NULL.
Ian
prev parent reply other threads:[~2011-01-17 0:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-15 11:11 autofs4_d_automount() can change path->dentry param David Howells
2011-01-17 0:07 ` Ian Kent [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=1295222831.2795.5.camel@perseus \
--to=raven@themaw.net \
--cc=autofs@linux.kernel.org \
--cc=dhowells@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.