The branch stable/12 has been updated by emaste:

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

commit 0754c27f49262e395d5814947a334dbd5b077504
Author:     Konstantin Belousov <k...@freebsd.org>
AuthorDate: 2023-02-11 18:05:14 +0000
Commit:     Ed Maste <ema...@freebsd.org>
CommitDate: 2023-09-11 18:04:52 +0000

    msdosfs deextend(): memoize DETOV(dep)
    
    (cherry picked from commit 67dc1e7b0457ec014a1291c5874decdefe7bffdd)
    (cherry picked from commit 03562adbefb80ba94bebe602fc051bbc4292cb37)
---
 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 beb615ec7a34..b251c2797467 100644
--- a/sys/fs/msdosfs/msdosfs_denode.c
+++ b/sys/fs/msdosfs/msdosfs_denode.c
@@ -475,13 +475,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);
 
        /*
@@ -507,10 +508,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)));
 }
 
 /*

Reply via email to