提交 8d30abff 编写于 作者: J Joe Thornber 提交者: Mike Snitzer

dm thin: return error from alloc_data_block if pool is not in write mode

Signed-off-by: NJoe Thornber <ejt@redhat.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 7f214665
......@@ -923,6 +923,9 @@ static int alloc_data_block(struct thin_c *tc, dm_block_t *result)
if (pool->no_free_space)
return -ENOSPC;
if (get_pool_mode(pool) != PM_WRITE)
return -EINVAL;
r = dm_pool_get_free_block_count(pool->pmd, &free_blocks);
if (r)
return r;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册