Subject: bug in msdosfs_link
To: None <netbsd-bugs@NetBSD.ORG>
From: Frank van der Linden <vdlinden@fwi.uva.nl>
List: netbsd-bugs
Date: 12/27/1994 18:02:37
 On NetBSD-current/i386 dated Dec 26 I noticed the following on my
mounted msdos partition.

# cd /dos
-----> this where the dos partition is mounted.
# ln autoexec.bat autoexec.new
-----> ln succeeds........
# rm autoexec.bat
-----> process hangs waiting for a lock to be removed.

 Right before msdosfs_link() in msdosfs_vnops.c is a comment about
unlocking the parent and aborting the operation. Currently
all that happens is a VOP_ABORTOP returning 0.
 Fixed in the diff below by adding lines for unlocking
and returning an EPERM value.

Onno van der Linden    c/o    vdlinden@fwi.uva.nl (Frank van der Linden)
*** /usr/src/sys/msdosfs/msdosfs_vnops.c.orig	Thu Dec 15 16:54:10 1994
--- /usr/src/sys/msdosfs/msdosfs_vnops.c	Tue Dec 27 15:59:52 1994
***************
*** 818,823 ****
  	} */ *ap;
  {
! 
! 	return (VOP_ABORTOP(ap->a_vp, ap->a_cnp));
  }
  
--- 818,824 ----
  	} */ *ap;
  {
! 	VOP_UNLOCK(ap->a_vp);
! 	VOP_ABORTOP(ap->a_vp, ap->a_cnp);
! 	return EPERM;
  }