summaryrefslogtreecommitdiff
path: root/fs/autofs/inode.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2022-07-08 04:43:06 +0300
committerakpm <akpm@linux-foundation.org>2022-07-18 03:31:42 +0300
commit9ccbac76e71de411b9c4beea9d91ba98f3fad690 (patch)
tree31f79d9d5101714b3bbc32851b5845aaa039a22d /fs/autofs/inode.c
parentf71381fcdc3ab615f55278d435a9f35542dc9e63 (diff)
downloadlinux-9ccbac76e71de411b9c4beea9d91ba98f3fad690.tar.xz
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>
Diffstat (limited to 'fs/autofs/inode.c')
-rw-r--r--fs/autofs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index 9edf243713eb..affa70360b1f 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -20,6 +20,7 @@ struct autofs_info *autofs_new_ino(struct autofs_sb_info *sbi)
INIT_LIST_HEAD(&ino->expiring);
ino->last_used = jiffies;
ino->sbi = sbi;
+ ino->count = 1;
}
return ino;
}