Date: Thu, 25 Feb 2021 12:58:30 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: 94412c2d00d6 - stable/13 - ffs: do not call softdep_prealloc() from UFS_BALLOC() Message-ID: <202102251258.11PCwUcI043905@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=94412c2d00d641fc2f0892e4b9b2f598c48c4eaa commit 94412c2d00d641fc2f0892e4b9b2f598c48c4eaa Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-02-18 14:51:50 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-02-25 12:55:18 +0000 ffs: do not call softdep_prealloc() from UFS_BALLOC() (cherry picked from commit 49831462794690155ce8dbe02679e6d9390f3d7d) --- sys/ufs/ffs/ffs_balloc.c | 5 ----- sys/ufs/ffs/ffs_vnops.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index daa897dfe032..1b53a90a48c4 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -128,8 +128,6 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, int size, return (EFBIG); gbflags = (flags & BA_UNMAPPED) != 0 ? GB_UNMAPPED : 0; - if (DOINGSOFTDEP(vp)) - softdep_prealloc(vp, MNT_WAIT); /* * If the next write will extend the file into a new block, * and the file is currently composed of a fragment @@ -621,9 +619,6 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size, return (EFBIG); gbflags = (flags & BA_UNMAPPED) != 0 ? GB_UNMAPPED : 0; - if (DOINGSOFTDEP(vp)) - softdep_prealloc(vp, MNT_WAIT); - /* * Check for allocating external data. */ diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 1dfdf5182a42..c00469c4c7e3 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -834,6 +834,11 @@ ffs_write(ap) int blkoffset, error, flags, ioflag, size, xfersize; vp = ap->a_vp; + if (DOINGSUJ(vp)) + softdep_prealloc(vp, MNT_WAIT); + if (vp->v_data == NULL) + return (EBADF); + uio = ap->a_uio; ioflag = ap->a_ioflag; if (ap->a_ioflag & IO_EXT)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102251258.11PCwUcI043905>