From: Leonardo Chiquitto <leonardo.lists@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Ian Kent <raven@themaw.net>,
autofs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
miklos@szeredi.hu
Subject: Re: When ghosting is enabled, failed mounts by AutoFS leave broken directories
Date: Tue, 9 Oct 2012 08:08:18 -0300 [thread overview]
Message-ID: <CAEySpB5c+Z2Cix62freuiH9ozu5Jx-6qFJ-mq=u9ZmPyq+EZ+A@mail.gmail.com> (raw)
In-Reply-To: <5064A225.4090607@msgid.tls.msk.ru>
On Thu, Sep 27, 2012 at 3:59 PM, Michael Tokarev <mjt@tls.msk.ru> wrote:
> On 27.09.2012 22:35, Leonardo Chiquitto wrote:
>> On Thu, Sep 27, 2012 at 1:35 AM, Ian Kent <raven@themaw.net> wrote:
> []
>>> I can confirm that there is no directory removal and re-create going on.
>>>
>>> Checking for that lead me to discover this mistake which fixes the
>>> symptom we're seeing:
>>>
>>> autofs4 - fix reset pending flag on mount fail
>>>
>>> From: Ian Kent <raven@themaw.net>
>>>
>>> In autofs4_d_automount(), if a mount fail occurs the AUTOFS_INF_PENDING
>>> mount pending flag is not cleared.
>>>
>>> One effect of this is when using the "browse" option, directory entry
>>> attributes show up with all "?"s due to the incorrect callback and
>>> subsequent failure return (when in fact no callback should be made).
>>
>> Reported-and-tested-by: Leonardo Chiquitto <lchiquitto@suse.de>
>>
>> Ian,
>>
>> I just tested the patch here and confirmed it works perfectly.
>
> Is it a -stable (kernel) material? This and the previous change,
> the locking logic fix/rework? Both appears to be needed for all
> current 3.x stable trees...
IMO, at least this one should be submitted to stable after it reaches
mainline.
Leonardo
>>> fs/autofs4/root.c | 6 ++++--
>>> 1 files changed, 4 insertions(+), 2 deletions(-)
>>>
>>>
>>> diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
>>> index 75e5f1c..8c4292f 100644
>>> --- a/fs/autofs4/root.c
>>> +++ b/fs/autofs4/root.c
>>> @@ -392,10 +392,12 @@ static struct vfsmount *autofs4_d_automount(struct path *path)
>>> ino->flags |= AUTOFS_INF_PENDING;
>>> spin_unlock(&sbi->fs_lock);
>>> status = autofs4_mount_wait(dentry);
>>> - if (status)
>>> - return ERR_PTR(status);
>>> spin_lock(&sbi->fs_lock);
>>> ino->flags &= ~AUTOFS_INF_PENDING;
>>> + if (status) {
>>> + spin_unlock(&sbi->fs_lock);
>>> + return ERR_PTR(status);
>>> + }
>>> }
>>> done:
>>> if (!(ino->flags & AUTOFS_INF_EXPIRING)) {
prev parent reply other threads:[~2012-10-09 11:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 20:14 When ghosting is enabled, failed mounts by AutoFS leave broken directories Leonardo Chiquitto
2012-09-25 2:13 ` Ian Kent
2012-09-25 21:42 ` Leonardo Chiquitto
2012-09-26 9:15 ` Ian Kent
2012-09-26 19:39 ` Leonardo Chiquitto
2012-09-27 1:04 ` Ian Kent
2012-09-27 4:35 ` Ian Kent
2012-09-27 18:35 ` Leonardo Chiquitto
2012-09-27 18:59 ` Michael Tokarev
2012-10-09 11:08 ` Leonardo Chiquitto [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='CAEySpB5c+Z2Cix62freuiH9ozu5Jx-6qFJ-mq=u9ZmPyq+EZ+A@mail.gmail.com' \
--to=leonardo.lists@gmail.com \
--cc=autofs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mjt@tls.msk.ru \
--cc=raven@themaw.net \
/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).