and remove repetetive code that calculates vnode locking type for write.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/kern/vfs_vnops.c | ||
---|---|---|
3091 | When is it possible for vn_start_write() to return mp = NULL? Clearly it will happen if the vnode is doomed. Are there other cases? If so, is it possible to have mp == NULL && outvp->v_mount != NULL? |
sys/kern/vfs_vnops.c | ||
---|---|---|
3091 | Official case is for VOP_GETWRITEMOUNT() to return EOPNOTSUPP. In this case vn_start_write() succeeds and sets mp to NULL, regardless of the reclamation status of the vnode. This was designed as a simple opt-out for filesystems that do need support write suspension and do not want to pay for the overhead of maintaining the mnt_writeopcount. Until we have such support, we should accept a possibility that mp == NULL but vp->v_mount != NULL. |