git: cc9958bf22f1 - main - ffs_reallocblks: change the guard for softdep_prealloc() call to DOINGSUJ()

Konstantin Belousov kib at FreeBSD.org
Wed Feb 24 07:56:58 UTC 2021


The branch main has been updated by kib:

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

commit cc9958bf22f1426faf4be8bf492ce69587a9008f
Author:     Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-02-19 12:37:12 +0000
Commit:     Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-02-24 07:54:30 +0000

    ffs_reallocblks: change the guard for softdep_prealloc() call to DOINGSUJ()
    
    instead of DOINGSOFTDEP().  The softdep_prealloc() function does nothing
    in SU case.
    
    Note that the call should be safe with regard to the vnode relock,
    because it is called with MNT_NOWAIT, which does not descend into fsync.
    
    Reviewed by:    mckusick
    Tested by:      pho
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
---
 sys/ufs/ffs/ffs_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 3b652ea14303..c7a1e2dec15e 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -543,7 +543,7 @@ ffs_reallocblks(ap)
 	 * here.  Instead we simply fail to reallocate blocks if this
 	 * rare condition arises.
 	 */
-	if (DOINGSOFTDEP(ap->a_vp))
+	if (DOINGSUJ(ap->a_vp))
 		if (softdep_prealloc(ap->a_vp, MNT_NOWAIT) != 0)
 			return (ENOSPC);
 	if (ump->um_fstype == UFS1)


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