Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2023 00:47:50 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2746fc0a5c89 - stable/13 - automount(8): when flushing autofs, specify fsid
Message-ID:  <202310240047.39O0loNI005123@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=2746fc0a5c8956deb2a13822c640fbee0fba5b95

commit 2746fc0a5c8956deb2a13822c640fbee0fba5b95
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-09-29 18:43:42 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-10-24 00:47:20 +0000

    automount(8): when flushing autofs, specify fsid
    
    PR:     272446
    
    (cherry picked from commit 56c44bd92efa002b2185445878fc98172ae8c66f)
---
 usr.sbin/autofs/automount.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c
index cee647cb4e2c..6637e16c9129 100644
--- a/usr.sbin/autofs/automount.c
+++ b/usr.sbin/autofs/automount.c
@@ -229,7 +229,7 @@ mount_unmount(struct node *root)
 }
 
 static void
-flush_autofs(const char *fspath)
+flush_autofs(const char *fspath, const fsid_t *fsid)
 {
 	struct iovec *iov = NULL;
 	char errmsg[255];
@@ -242,6 +242,8 @@ flush_autofs(const char *fspath)
 	    __DECONST(void *, "autofs"), (size_t)-1);
 	build_iovec(&iov, &iovlen, "fspath",
 	    __DECONST(void *, fspath), (size_t)-1);
+	build_iovec(&iov, &iovlen, "fsid",
+	    __DECONST(void *, fsid), sizeof(*fsid));
 	build_iovec(&iov, &iovlen, "errmsg",
 	    errmsg, sizeof(errmsg));
 
@@ -291,7 +293,7 @@ flush_caches(void)
 			continue;
 		}
 
-		flush_autofs(mntbuf[i].f_mntonname);
+		flush_autofs(mntbuf[i].f_mntonname, &statbuf.f_fsid);
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310240047.39O0loNI005123>