On Wed, Apr 11, 2018 at 12:34:03PM +0200, Martin Pieuchot wrote:
> @@ -769,6 +769,7 @@ nfs_lookup(void *v)
> flags = cnp->cn_flags;
>
> *vpp = NULLVP;
> + newvp = NULLVP;
> if ((flags & ISLASTCN) && (dvp->v_mount->mnt_flag & MNT_RDONLY) &&
> (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME))
> return (EROFS);
I dont see why this is necessary, but it does not hurt either.
> @@ -1545,9 +1545,9 @@ nfs_remove(void *v)
> int
> nfs_removeit(struct sillyrename *sp)
> {
> + KASSERT(VOP_ISLOCKED(sp->s_dvp));
> /*
> * Make sure that the directory vnode is still valid.
> - * XXX we should lock sp->s_dvp here.
With the assert removed it passes regress, otherwise it panics.
bluhm