diff options
author | kib <kib@FreeBSD.org> | 2017-06-10 11:14:54 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2017-06-10 11:14:54 +0000 |
commit | a792c4a78cc396cbe2e4eb2d13bb2d7a541a9185 (patch) | |
tree | c534573a6ed15a2e890a9d22769f50ce2a1cdb6a /sys/ufs/ffs | |
parent | 10724e750c40513dd4cab0353200339800d007df (diff) | |
download | FreeBSD-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.c | 4 |
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: |