Re: [PATCH v2 31/50] convert autofs

Al Viro
2025-10-28T01:55:57Z

On Tue, Oct 28, 2025 at 12:45:50AM +0000, Al Viro wrote:

> @@ -627,7 +626,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry)
>
> p_ino = autofs_dentry_ino(dentry->d_parent);
> p_ino->count--;
> - dput(dentry);
> + d_make_discardable(dentry);
>
> d_inode(dentry)->i_size = 0;
> clear_nlink(d_inode(dentry));

BTW, is there any reason why autofs_dir_unlink() does not update
ctime of the parent directory? Try it on a normal filesystem:

; mkdir foo
; touch foo/bar
; stat --printf='%z\n' foo
2025-10-27 21:40:03.489427380 -0400
; rm foo/bar
; stat --printf='%z\n' foo
2025-10-27 21:40:16.853470607 -0400

and note the change of ctime of directory reported after removing
an entry in it. All Unices since v7 had been that way...

Why does autofs unlink() need to be different in that respect?
Some userland reasons?