Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jun 2022 05:02:03 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: c1731fa54dd1 - stable/13 - KERN_LOCKF: report kl_file_fsid consistently with stat(2)
Message-ID:  <202206250502.25P5230j061100@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=c1731fa54dd1eec310729e81e18dd601201405dc

commit c1731fa54dd1eec310729e81e18dd601201405dc
Author:     Damjan Jovanovic <damjan.jov@gmail.com>
AuthorDate: 2022-06-17 13:28:16 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-06-24 19:37:33 +0000

    KERN_LOCKF: report kl_file_fsid consistently with stat(2)
    
    PR:     264723
    
    (cherry picked from commit 8ae769491303715c68e79aaf0e4e2f5c639151f9)
---
 sys/kern/kern_lockf.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c
index f1a432e66bd8..52c603949bdc 100644
--- a/sys/kern/kern_lockf.c
+++ b/sys/kern/kern_lockf.c
@@ -2479,7 +2479,6 @@ vfs_report_lockf(struct mount *mp, struct sbuf *sb)
 	struct ucred *ucred;
 	char *fullpath, *freepath;
 	struct stat stt;
-	fsid_t fsidx;
 	STAILQ_HEAD(, kinfo_lockf_linked) locks;
 	int error, gerror;
 
@@ -2522,7 +2521,6 @@ vfs_report_lockf(struct mount *mp, struct sbuf *sb)
 
 	gerror = 0;
 	ucred = curthread->td_ucred;
-	fsidx = mp->mnt_stat.f_fsid;
 	while ((klf = STAILQ_FIRST(&locks)) != NULL) {
 		STAILQ_REMOVE_HEAD(&locks, link);
 		vp = klf->vp;
@@ -2533,8 +2531,7 @@ vfs_report_lockf(struct mount *mp, struct sbuf *sb)
 				    curthread);
 			VOP_UNLOCK(vp);
 			if (error == 0) {
-				memcpy(&klf->kl.kl_file_fsid, &fsidx,
-				    sizeof(fsidx));
+				klf->kl.kl_file_fsid = stt.st_dev;
 				klf->kl.kl_file_rdev = stt.st_rdev;
 				klf->kl.kl_file_fileid = stt.st_ino;
 				freepath = NULL;



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