Re: unlink system call on directories - Bug + fix

Andrew M. Bishop (
Mon, 18 Nov 1996 07:23:09 GMT

Kenneth Albanowski <> wrote:
> On Fri, 15 Nov 1996, Andrew M. Bishop wrote:
> > Even worse for NFS, the unlink() call will succeed on directories.
> > The inode will disapear, only to be found in lost+found on the
> > file server next time it is fsck'd.
> This can't be right. If this does occur, it is the server's fault, not the
> client.

The same filesystem, exported from SunOS 4.1.1, mounted on SunOS 4.1.4
does not allow directories to be unlinked. So I conclude that the
server is not wrong. The Linux kernel should know that the file is a
directory and not even try to unlink it since it knows it is not

Andrew M. Bishop