Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Feb 2022 09:50:55 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: 7c2d965ca8e7 - stable/13 - ufs: be more persistent with finishing some operations
Message-ID:  <202202070950.2179otBU059085@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=7c2d965ca8e7736689755fea521313610aeef4c3

commit 7c2d965ca8e7736689755fea521313610aeef4c3
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-01-18 01:49:36 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-02-07 09:38:50 +0000

    ufs: be more persistent with finishing some operations
    
    (cherry picked from commit 8d8589b385c901581ee71d09d86d044a6f42dfef)
---
 sys/ufs/ffs/ffs_inode.c   | 2 +-
 sys/ufs/ffs/ffs_softdep.c | 2 +-
 sys/ufs/ffs/ffs_vnops.c   | 2 +-
 sys/ufs/ufs/inode.h       | 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index 4b2b2989fb81..3c1903fcbae6 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -179,7 +179,7 @@ loop:
 		pause("ffsupd", 1);
 		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 		vrele(vp);
-		if (VN_IS_DOOMED(vp))
+		if (!IS_UFS(vp))
 			return (ENOENT);
 
 		/*
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 8bc5e409cf04..37709b605fbd 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -13774,7 +13774,7 @@ softdep_request_cleanup_inactivate(struct mount *mp)
 		vholdl(vp);
 		vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY);
 		VI_LOCK(vp);
-		if (vp->v_data != NULL && vp->v_usecount == 0) {
+		if (IS_UFS(vp) && vp->v_usecount == 0) {
 			while ((vp->v_iflag & VI_OWEINACT) != 0) {
 				error = vinactive(vp);
 				if (error != 0 && error != ERELOOKUP)
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index ceea2237c94e..a33699515bc2 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -2066,7 +2066,7 @@ ffs_vput_pair(struct vop_vput_pair_args *ap)
 	 *    and respond to dead vnodes by returning ESTALE.
 	 */
 	VOP_LOCK(vp, vp_locked | LK_RETRY);
-	if (!VN_IS_DOOMED(vp))
+	if (IS_UFS(vp))
 		return (0);
 
 	/*
diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h
index 2ff619b4eac0..3e555dc52a32 100644
--- a/sys/ufs/ufs/inode.h
+++ b/sys/ufs/ufs/inode.h
@@ -245,6 +245,7 @@ I_IS_UFS2(const struct inode *ip)
 #define	SHORTLINK(ip)	(I_IS_UFS1(ip) ?			\
     (caddr_t)(ip)->i_din1->di_db : (caddr_t)(ip)->i_din2->di_db)
 #define	IS_SNAPSHOT(ip)		((ip)->i_flags & SF_SNAPSHOT)
+#define	IS_UFS(vp)		((vp)->v_data != NULL)
 
 /*
  * Structure used to pass around logical block paths generated by



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