From 70f23c67fc769ee3c4e63007a2c91e258df9e1cd Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 9 Oct 2011 18:08:03 -0700 Subject: [PATCH] -Fix mount_point access in ffs_blkfree() when using softdep -Was going through inode->vnode->v_mount, but vnode was bad so v_mount was NULL reference -New way to get mount point: inode->i_devvp->v_mount. --- sys/vfs/ufs/ffs_alloc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vfs/ufs/ffs_alloc.c b/sys/vfs/ufs/ffs_alloc.c index 7ee59c4..a3eb225 100644 --- a/sys/vfs/ufs/ffs_alloc.c +++ b/sys/vfs/ufs/ffs_alloc.c @@ -1658,10 +1658,10 @@ ffs_blkfree_trim_completed(struct bio *biop) void ffs_blkfree(struct inode *ip, ufs_daddr_t bno, long size) { - struct ufsmount *ump = VFSTOUFS(ITOV(ip)->v_mount);; + struct mount *mp = ip->i_devvp->v_mount; struct ffs_blkfree_trim_params *tp; - if (!(ump->um_mountp->mnt_flag & MNT_TRIM)) { + if (!(mp->mnt_flag & MNT_TRIM)) { ffs_blkfree_cg(ip->i_fs, ip->i_devvp,ip->i_dev,ip->i_number, ip->i_uid, bno, size); return; -- 1.7.0.4