git: 03562adbefb8 - stable/13 - msdosfs deextend(): memoize DETOV(dep)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 19 Feb 2023 05:47:17 UTC
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=03562adbefb80ba94bebe602fc051bbc4292cb37 commit 03562adbefb80ba94bebe602fc051bbc4292cb37 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-02-11 18:05:14 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-02-19 05:16:25 +0000 msdosfs deextend(): memoize DETOV(dep) (cherry picked from commit 67dc1e7b0457ec014a1291c5874decdefe7bffdd) --- sys/fs/msdosfs/msdosfs_denode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 8511d873ea50..003c710801ee 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -494,13 +494,14 @@ int deextend(struct denode *dep, u_long length, struct ucred *cred) { struct msdosfsmount *pmp = dep->de_pmp; + struct vnode *vp = DETOV(dep); u_long count; int error; /* * The root of a DOS filesystem cannot be extended. */ - if ((DETOV(dep)->v_vflag & VV_ROOT) && !FAT32(pmp)) + if ((vp->v_vflag & VV_ROOT) != 0 && !FAT32(pmp)) return (EINVAL); /* @@ -526,10 +527,10 @@ deextend(struct denode *dep, u_long length, struct ucred *cred) return (error); } } - vnode_pager_setsize(DETOV(dep), length); + vnode_pager_setsize(vp, length); dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; - return (deupdat(dep, !DOINGASYNC(DETOV(dep)))); + return (deupdat(dep, !DOINGASYNC(vp))); } /*