rem: mount = get_mount(mountID); if (mount == NULL) return B_BAD_VALUE;
add: status_t status = get_mount(mountID, &mount); if (status < B_OK) return status;
context: index_dir_open(mount_id mountID, bool kernel){	struct fs_mount *mount;	fs_cookie cookie;	status_t status;	FUNCTION(("index_dir_open(mountID = %ld, kernel = %d)\n", mountID, kernel));	mount = get_mount(mountID);	if (mount == NULL)		return B_BAD_VALUE;	if (FS_MOUNT_CALL(mount, open_index_dir) == NULL) {		status = EOPNOTSUPP;		goto out;	}	status = FS_MOUNT_CALL(mount, open_index_dir)(mount->cookie, &cookie);	if (status < B_OK)		goto out;	// get fd for the index directory	status = get_new_fd(FDTYPE_INDEX_DIR, mount, NULL, cookie, 0, kernel);	if (status >= 0)		goto out;	// something went wrong	FS_MOUNT_CALL(mount, close_index_dir)(mount->cookie, cookie);	FS_MOUNT_CALL(mount, free_index_dir_cookie)(mount->cookie, cookie);out:	put_mount(mount);	return status;}