ufs: relax an overzealous assert added in r356671
Part of i_flag can persist across a drop to hold count of 0, at which point the vnode is taken off the lazy list. Then whoever locks and unlocks the vnode can trip on the assert. This trips over kyua running a test untarring character devices to ufs. Reported by: lwhsu
This commit is contained in:
parent
fedab1b499
commit
f1fcaffd8e
@ -485,7 +485,7 @@ ffs_unlock_debug(struct vop_unlock_args *ap)
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct inode *ip = VTOI(vp);
|
||||
|
||||
if (ip->i_flag & UFS_INODE_FLAG_LAZY_MASK) {
|
||||
if (ip->i_flag & UFS_INODE_FLAG_LAZY_MASK_ASSERTABLE) {
|
||||
if ((vp->v_mflag & VMP_LAZYLIST) == 0) {
|
||||
VI_LOCK(vp);
|
||||
VNASSERT((vp->v_mflag & VMP_LAZYLIST), vp,
|
||||
|
@ -140,6 +140,12 @@ struct inode {
|
||||
|
||||
#define UFS_INODE_FLAG_LAZY_MASK \
|
||||
(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE | IN_LAZYMOD | IN_LAZYACCESS)
|
||||
/*
|
||||
* Some flags can persist a vnode transitioning to 0 hold count and being tkaen
|
||||
* off the list.
|
||||
*/
|
||||
#define UFS_INODE_FLAG_LAZY_MASK_ASSERTABLE \
|
||||
(UFS_INODE_FLAG_LAZY_MASK & ~(IN_LAZYMOD | IN_LAZYACCESS))
|
||||
|
||||
#define UFS_INODE_SET_FLAG(ip, flags) do { \
|
||||
struct inode *_ip = (ip); \
|
||||
|
Loading…
Reference in New Issue
Block a user