ZFS: Fix a panic while unmounting a busy filesystem.
This particular scenario was easily reproduced using a NFS export. When the first 'zfs unmount' occurred, it returned EBUSY via this path, while vflush() had flushed references on the filesystem's root vnode, which in turn caused its v_interlock to be destroyed. The next time 'zfs unmount' was called, vflush() tried to obtain this lock, which caused this panic. Since vflush() on FreeBSD is a definitive call, there is no need to check vfsp->vfs_count after it completes. Simply #ifdef sun this check. Submitted by: avg Reviewed by: avg Approved by: ken (mentor) MFC after: 1 month
This commit is contained in:
parent
fdbc71742b
commit
58567a1b4e
@ -1968,6 +1968,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
#ifdef sun
|
||||
if (!(fflag & MS_FORCE)) {
|
||||
/*
|
||||
* Check the number of active vnodes in the file system.
|
||||
@ -1988,6 +1989,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
|
||||
return (EBUSY);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
VERIFY(zfsvfs_teardown(zfsvfs, B_TRUE) == 0);
|
||||
os = zfsvfs->z_os;
|
||||
|
Loading…
Reference in New Issue
Block a user