/* %-EINVAL - bmap is broken. (the caller should call nilfs_error())  */
int nilfs_mdt_delete_block(struct inode *inode, unsigned long block)
/* %-EINVAL - bmap is broken. (the caller should call nilfs_error())  */
int nilfs_mdt_delete_block(struct inode *inode, unsigned long block)
{
	struct nilfs_inode_info *ii = NILFS_I(inode);
	int err;
	err = nilfs_bmap_delete(ii->i_bmap, block);
	if (!err || err == -ENOENT) {
		nilfs_mdt_mark_dirty(inode);
		nilfs_mdt_forget_block(inode, block);
	}
	return err;
}