git: a924a143ddfe - stable/13 - ufs_rename(): do not treat ERELOOKUP specially

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 13 Jul 2022 08:48:36 UTC
The branch stable/13 has been updated by kib:

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

commit a924a143ddfea5d1a70b693b39f48aaae521389a
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-07-02 13:15:57 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-07-13 08:38:01 +0000

    ufs_rename(): do not treat ERELOOKUP specially
    
    (cherry picked from commit ab5ef5fb6355489e6a960b4d107e6767e2336ea2)
---
 sys/ufs/ufs/ufs_vnops.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 7938902676ca..06bde030d32f 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1411,18 +1411,8 @@ relock:
 	     (tvp != NULL && (seqc_in_modify(tvp_s) ||
 	     !vn_seqc_consistent(tvp, tvp_s))))) {
 		error = softdep_prerename(fdvp, fvp, tdvp, tvp);
-		if (error != 0) {
-			if (error == ERELOOKUP) {
-				fdvp_s = vn_seqc_read_any(fdvp);
-				fvp_s = vn_seqc_read_any(fvp);
-				tdvp_s = vn_seqc_read_any(tdvp);
-				if (tvp != NULL)
-					tvp_s = vn_seqc_read_any(tvp);
-				atomic_add_int(&rename_restarts, 1);
-				goto relock;
-			}
+		if (error != 0)
 			goto releout;
-		}
 	}
 
 	fdp = VTOI(fdvp);
@@ -1466,11 +1456,6 @@ relock:
 			vref(tvp);
 		VOP_VPUT_PAIR(tdvp, &tvp, true);
 		error = ufs_sync_nlink1(mp);
-		if (error == ERELOOKUP) {
-			error = 0;
-			atomic_add_int(&rename_restarts, 1);
-			goto relock;
-		}
 		vrele(fdvp);
 		vrele(fvp);
 		vrele(tdvp);
@@ -1619,11 +1604,6 @@ relock:
 					vref(tvp);
 				VOP_VPUT_PAIR(tdvp, &tvp, true);
 				error = ufs_sync_nlink1(mp);
-				if (error == ERELOOKUP) {
-					error = 0;
-					atomic_add_int(&rename_restarts, 1);
-					goto relock;
-				}
 				vrele(fdvp);
 				vrele(fvp);
 				vrele(tdvp);