aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-01-23 23:12:39 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-02-12 01:02:21 +0000
commit6aed2435c8bf1fa55891c7d30186c9ad91064da8 (patch)
tree9fd760bae29533f4f27dff3fd2644ddb82ddc758 /sys
parentede40b0675155b5cc862652f2fee11c738a46bcd (diff)
downloadsrc-6aed2435c8bf1fa55891c7d30186c9ad91064da8.tar.gz
src-6aed2435c8bf1fa55891c7d30186c9ad91064da8.zip
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
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ufs/ufs_vnops.c12
1 files 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);