autofs: make dentry info count consistent
authorIan Kent <raven@themaw.net>
Fri, 8 Jul 2022 01:43:06 +0000 (09:43 +0800)
committerakpm <akpm@linux-foundation.org>
Mon, 18 Jul 2022 00:31:42 +0000 (17:31 -0700)
commit9ccbac76e71de411b9c4beea9d91ba98f3fad690
tree31f79d9d5101714b3bbc32851b5845aaa039a22d
parentf71381fcdc3ab615f55278d435a9f35542dc9e63
autofs: make dentry info count consistent

If an autofs dentry is a mount root directory there's no ->mkdir() call to
set its count to one.

To make the dentry info count consistent for all autofs dentries set count
to one when the dentry info struct is allocated.

Link: https://lkml.kernel.org/r/165724458671.30914.2902424437132835325.stgit@donald.themaw.net
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/autofs/inode.c
fs/autofs/root.c