rem: FUNCTION(("vfs_mount: entry. path = '%s', fs_name = '%s'\n", path, fsName));
add: FUNCTION(("fs_mount: entry. path = '%s', fs_name = '%s'\n", path, fsName));
context: fs_mount(char *path, const char *device, const char *fsName, void *args, bool kernel){	struct fs_mount *mount;	struct vnode *covered_vnode = NULL;	vnode_id root_id;	int err = 0;	FUNCTION(("vfs_mount: entry. path = '%s', fs_name = '%s'\n", path, fsName));	if (device[0] == '\0' || fsName[0] == '\0')		return B_BAD_VALUE;	mutex_lock(&gMountOpMutex);	mount = (struct fs_mount *)kmalloc(sizeof(struct fs_mount));	if (mount == NULL) {		err = B_NO_MEMORY;		goto err;	}	mount->vnodes_head = mount->vnodes_tail = NULL;	mount->mount_point = kstrdup(path);	if (mount->mount_point == NULL) {		err = B_NO_MEMORY;		goto err1;	}	mount->fs = get_file_system(fsName);	if (mount->fs == NULL) {		err = ERR_VFS_INVALID_FS;		goto err2;	}	recursive_lock_create(&mount->rlock);	mount->id = gNextMountID++;	mount->unmounting = false;	if (!gRoot) {		// we haven't mounted anything yet		if (strcmp(path, "/") != 0) {			err = ERR_VFS_GENERAL;			goto err3;		}		err = FS_MOUNT_CALL(mount, mount)(mount->id, device, NULL, &mount->cookie, &root_id);		if (err < 0) {			err = ERR_VFS_GENERAL;			goto err3;		}		mount->covers_vnode = NULL; // this is the root mount	} else {		err = path_to_vnode(path, true, &covered_vnode, kernel);		if (err < 0)			goto err2;		if (!covered_vnode) {			err = ERR_VFS_GENERAL;			goto err2;		}		// XXX insert check to make sure covered_vnode is a DIR, or maybe it's okay for it not to be		if (covered_vnode != gRoot			&& covered_vnode->mount->root_vnode == covered_vnode) {			err = ERR_VFS_ALREADY_MOUNTPOINT;			goto err2;		}		mount->covers_vnode = covered_vnode;		// mount it		err = FS_MOUNT_CALL(mount, mount)(mount->id, device, NULL, &mount->cookie, &root_id);		if (err < 0)			goto err4;	}	mutex_lock(&gMountMutex);	// insert mount struct into list	hash_insert(gMountsTable, mount);	mutex_unlock(&gMountMutex);	err = get_vnode(mount->id, root_id, &mount->root_vnode, 0);	if (err < 0)		goto err5;	// XXX may be a race here	if (mount->covers_vnode)		mount->covers_vnode->covered_by = mount->root_vnode;	if (!gRoot)		gRoot = mount->root_vnode;	mutex_unlock(&gMountOpMutex);	return 0;err5:	FS_MOUNT_CALL(mount, unmount)(mount->cookie);err4:	if (mount->covers_vnode)		put_vnode(mount->covers_vnode);err3:	recursive_lock_destroy(&mount->rlock);	put_file_system(mount->fs);err2:	kfree(mount->mount_point);err1:	kfree(mount);err:	mutex_unlock(&gMountOpMutex);	return err;}