error_t netfs_S_dir_unlink (struct protid *user, char *name) { error_t err; mutex_lock (&user->po->np->lock); err = netfs_attempt_unlink (user->user, user->po->np, name); mutex_unlock (&user->po->np->lock); return err; }
/* Worker function to delete nodes that don't have any more local references or links. */ void * forked_node_delete (void *arg) { struct fnd *args = arg; pthread_mutex_lock (&args->dir->lock); netfs_attempt_unlink ((struct iouser *)-1, args->dir, args->name); netfs_nput (args->dir); free (args->name); free (args); return 0; };
/* The user must define this function. Attempt to remove directory named NAME in DIR (which is locked) for USER. */ error_t netfs_attempt_rmdir (struct iouser *user, struct node *dir, char *name) { /* Simply redirect the call */ return netfs_attempt_unlink (user, dir, name); }