mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Christian Brauner <brauner@kernel.org>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	autofs mailing list <autofs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 1/2] autofs: fix per-dentry timeout warning
Date: Wed, 3 Dec 2025 07:19:59 +0800	[thread overview]
Message-ID: <ff0846cf-5226-466c-ac92-545c070fffd9@themaw.net> (raw)
In-Reply-To: <20251111060439.19593-2-raven@themaw.net>

Hey Christian,


Sorry to bother you but did this one get missed due to

the distraction of the discussion about patch 2?


Ian

On 11/11/25 14:04, Ian Kent wrote:
> The check that determines if the message that warns about the per-dentry
> timeout being greater than the super block timeout is not correct.
>
> The initial value for this field is -1 and the type of the field is
> unsigned long.
>
> I could change the type to long but the message is in the wrong place
> too, it should come after the timeout setting. So leave everything else
> as it is and move the message and check the timeout is actually set
> as an additional condition on issuing the message. Also fix the timeout
> comparison.
>
> Signed-off-by: Ian Kent <raven@themaw.net>
> ---
>   fs/autofs/dev-ioctl.c | 22 ++++++++++++----------
>   1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/fs/autofs/dev-ioctl.c b/fs/autofs/dev-ioctl.c
> index d8dd150cbd74..8adef8caa863 100644
> --- a/fs/autofs/dev-ioctl.c
> +++ b/fs/autofs/dev-ioctl.c
> @@ -449,16 +449,6 @@ static int autofs_dev_ioctl_timeout(struct file *fp,
>   		if (!autofs_type_indirect(sbi->type))
>   			return -EINVAL;
>   
> -		/* An expire timeout greater than the superblock timeout
> -		 * could be a problem at shutdown but the super block
> -		 * timeout itself can change so all we can really do is
> -		 * warn the user.
> -		 */
> -		if (timeout >= sbi->exp_timeout)
> -			pr_warn("per-mount expire timeout is greater than "
> -				"the parent autofs mount timeout which could "
> -				"prevent shutdown\n");
> -
>   		dentry = try_lookup_noperm(&QSTR_LEN(param->path, path_len),
>   					   base);
>   		if (IS_ERR_OR_NULL(dentry))
> @@ -487,6 +477,18 @@ static int autofs_dev_ioctl_timeout(struct file *fp,
>   			ino->flags |= AUTOFS_INF_EXPIRE_SET;
>   			ino->exp_timeout = timeout * HZ;
>   		}
> +
> +		/* An expire timeout greater than the superblock timeout
> +		 * could be a problem at shutdown but the super block
> +		 * timeout itself can change so all we can really do is
> +		 * warn the user.
> +		 */
> +		if (ino->flags & AUTOFS_INF_EXPIRE_SET &&
> +		    ino->exp_timeout > sbi->exp_timeout)
> +			pr_warn("per-mount expire timeout is greater than "
> +				"the parent autofs mount timeout which could "
> +				"prevent shutdown\n");
> +
>   		dput(dentry);
>   	}
>   

  reply	other threads:[~2025-12-02 23:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11  6:04 [PATCH 0/2] autofs: fairly minor fixes Ian Kent
2025-11-11  6:04 ` [PATCH 1/2] autofs: fix per-dentry timeout warning Ian Kent
2025-12-02 23:19   ` Ian Kent [this message]
2025-11-11  6:04 ` [PATCH 2/2] autofs: dont trigger mount if it cant succeed Ian Kent
2025-11-11  6:59   ` Al Viro
2025-11-11  8:25     ` Ian Kent
2025-11-11  9:04       ` Al Viro
2025-11-11 10:13         ` Ian Kent
2025-11-11 10:16           ` Al Viro
2025-11-11 10:19   ` Christian Brauner
2025-11-11 10:24     ` Al Viro
2025-11-11 10:55       ` Christian Brauner
2025-11-11 12:27         ` Ian Kent
2025-11-12 11:01           ` Christian Brauner
2025-11-13  0:14             ` Ian Kent
2025-11-13 13:19               ` Christian Brauner
2025-11-13 23:49                 ` Ian Kent
2025-11-14  0:07                   ` Ian Kent
2025-11-14 11:44                   ` Christian Brauner
2025-11-14 13:42                     ` Ian Kent

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=ff0846cf-5226-466c-ac92-545c070fffd9@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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®