git: 6aed2435c8bf - main - ufs vnops: brace softdep_prelink() with DOINGSUJ instead of DOINGSOFTDEP

Konstantin Belousov kib at FreeBSD.org
Fri Feb 12 01:07:26 UTC 2021


The branch main has been updated by kib:

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

commit 6aed2435c8bf1fa55891c7d30186c9ad91064da8
Author:     Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-01-23 23:12:39 +0000
Commit:     Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-02-12 01:02:21 +0000

    ufs vnops: brace softdep_prelink() with DOINGSUJ instead of DOINGSOFTDEP
    
    because softdep_prelink() is reverted to NOP for non-J case.  There is no
    need to do anything before ufs_direnter() in SU/non-J case, everything
    required to sync the directory is done in VOP_VPUT_PAIR().
    
    Suggested by:   mckusick
    Reviewed by:    chs, mckusick
    Tested by:      pho
    MFC after:      2 week
    Sponsored by:   The FreeBSD Foundation
---
 sys/ufs/ufs/ufs_vnops.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index b035a8b1c34d..e6a78c3655cc 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1006,7 +1006,7 @@ ufs_remove(ap)
 	if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) ||
 	    (VTOI(dvp)->i_flags & APPEND))
 		return (EPERM);
-	if (DOINGSOFTDEP(dvp)) {
+	if (DOINGSUJ(dvp)) {
 		error = softdep_prelink(dvp, vp);
 		if (error != 0) {
 			MPASS(error == ERELOOKUP);
@@ -1071,7 +1071,7 @@ ufs_link(ap)
 		panic("ufs_link: no name");
 #endif
 
-	if (DOINGSOFTDEP(tdvp)) {
+	if (DOINGSUJ(tdvp)) {
 		error = softdep_prelink(tdvp, vp);
 		if (error != 0) {
 			MPASS(error == ERELOOKUP);
@@ -1142,7 +1142,7 @@ ufs_whiteout(ap)
 	struct direct newdir;
 	int error = 0;
 
-	if (DOINGSOFTDEP(dvp) && (ap->a_flags == CREATE ||
+	if (DOINGSUJ(dvp) && (ap->a_flags == CREATE ||
 	    ap->a_flags == DELETE)) {
 		error = softdep_prelink(dvp, NULL);
 		if (error != 0) {
@@ -1945,7 +1945,7 @@ ufs_mkdir(ap)
 		goto out;
 	}
 
-	if (DOINGSOFTDEP(dvp)) {
+	if (DOINGSUJ(dvp)) {
 		error = softdep_prelink(dvp, NULL);
 		if (error != 0) {
 			MPASS(error == ERELOOKUP);
@@ -2209,7 +2209,7 @@ ufs_rmdir(ap)
 		error = EINVAL;
 		goto out;
 	}
-	if (DOINGSOFTDEP(dvp)) {
+	if (DOINGSUJ(dvp)) {
 		error = softdep_prelink(dvp, vp);
 		if (error != 0) {
 			MPASS(error == ERELOOKUP);
@@ -2736,7 +2736,7 @@ ufs_makeinode(mode, dvp, vpp, cnp, callfunc)
 		print_bad_link_count(callfunc, dvp);
 		return (EINVAL);
 	}
-	if (DOINGSOFTDEP(dvp)) {
+	if (DOINGSUJ(dvp)) {
 		error = softdep_prelink(dvp, NULL);
 		if (error != 0) {
 			MPASS(error == ERELOOKUP);


More information about the dev-commits-src-all mailing list