summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2017-06-10 11:14:54 +0000
committerkib <kib@FreeBSD.org>2017-06-10 11:14:54 +0000
commita792c4a78cc396cbe2e4eb2d13bb2d7a541a9185 (patch)
treec534573a6ed15a2e890a9d22769f50ce2a1cdb6a /sys/ufs/ffs
parent10724e750c40513dd4cab0353200339800d007df (diff)
downloadFreeBSD-src-a792c4a78cc396cbe2e4eb2d13bb2d7a541a9185.zip
FreeBSD-src-a792c4a78cc396cbe2e4eb2d13bb2d7a541a9185.tar.gz
MFC r319518:
Ensure that cached struct thread does not keep spurious td_su reference on an UFS mount point. MFC r319519: Clean possible td_su reference on the struct mount being unmounted as the last step of ffs_unmount(). Approved by: re (gjb)
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 3760e8f..9c2b060 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1317,6 +1317,10 @@ ffs_unmount(mp, mntflags)
MNT_ILOCK(mp);
mp->mnt_flag &= ~MNT_LOCAL;
MNT_IUNLOCK(mp);
+ if (td->td_su == mp) {
+ td->td_su = NULL;
+ vfs_rel(mp);
+ }
return (error);
fail:
OpenPOWER on IntegriCloud