OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f21466
)
dm thin: return error from alloc_data_block if pool is not in write mode
author
Joe Thornber
<ejt@redhat.com>
Thu, 5 Dec 2013 00:16:11 +0000
(19:16 -0500)
committer
Mike Snitzer
<snitzer@redhat.com>
Tue, 7 Jan 2014 15:14:24 +0000
(10:14 -0500)
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-thin.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-thin.c
b/drivers/md/dm-thin.c
index
5f1b11e
..
1988019
100644
(file)
--- a/
drivers/md/dm-thin.c
+++ b/
drivers/md/dm-thin.c
@@
-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;