Actions
Bug #7653
closedtmpfs: calling unlink() on a directory which isn't empty should fail
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
Updated by Andrew Stormont over 5 years ago
I opted to have the function return EEXIST which seems to be in-keeping with the spec:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html
Updated by Andrew Stormont over 5 years ago
Running unlink on directory that only contains directories also seems to cause a panic!
The webrev above fixes that issue too.
Updated by Andrew Stormont over 5 years ago
- Status changed from In Progress to Feedback
Updated by Andrew Stormont over 5 years ago
- Status changed from Feedback to Closed
Closing this as I think having tmpfs error out is the wrong approach.
Actions