9ns: Fix issues with can_have_children
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 26 Jul 2018 20:24:13 +0000 (16:24 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 30 Jul 2018 20:05:46 +0000 (16:05 -0400)
commite218410ad68df122d05695158f0d936e3967c9f1
treec8107c3dda4d2bf2c0b41c7cc89ca1444a11df29
parentf86fa40b9c2e7905d475c5e7f7be79bfc8574482
9ns: Fix issues with can_have_children

Two things:
1) We cleared can_have_children even when an rmdir failed.  Then subsequent
renames would fail, since it thought the directory was being removed.
2) We never checked can_have_children when creating files.  Maybe I had a
good reason for this, but it's not apparent.  In this case, you might be
able to add a file (or a negative dentry) to a directory while it is being
removed.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/tree_file.c