Ludovic Courtès <[EMAIL PROTECTED]> writes: > Consider the following case which is what happens when using "rm". On the > client side (rm), the program takes the following steps when typing "rm x": > 1. lookup "." > 2. lookup "x" > 3. close x (ie. mach_port_deallocate () the above port) > 4. unlink "x". > On the server side, the successful lookup of "x" adds a reference to the > corresponding node which is then dropped when the client closes it. > > However, when my netfs_attempt_unlink () is called and has locked the > refcnt spin lock, it turns out that the reference has not been dropped yet. > Since the number of references to the node is greater than 1, it will just > return EBUSY.
This is incorrect behavior for netfs_attempt_unlink. There is nothing wrong with unlinking a node that still has other references, and if this is done, you must not actually free any storage until all the references go away. (That is, other users that have the file open must have it continue to work as before.) _______________________________________________ Help-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-hurd