Project

General

Profile

Bug #7653

tmpfs: calling unlink() on a directory which isn't empty should fail

Added by Andrew Stormont over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Category:
filesystems (not ZFS)
Start date:
2016-12-07
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Calling unlink() on a directory which isn't empty should fail. Instead the directory gets removed but its entries don't get freed. This is similar to #7203, which is specific to freeing empty directories. How this wasn't caught sooner has me scratching my head.

It seems like we have two choices for the errno.
ENOTEMPTY - what freebsd would return
EEXIST - this seems more illumos-like

Also available in: Atom PDF