summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-10 14:37:15 +0100
committerAlasdair G Kergon <agk@redhat.com>2013-05-10 14:37:15 +0100
commit09e8b813897a0f85bb401435d009228644c81214 (patch)
tree4ce61c46f1db01c6f15b34e15657606bacacd63c /drivers/md
parentfa4d683af3693863bec761e2761a07e4c1351f86 (diff)
downloadblackbird-op-linux-09e8b813897a0f85bb401435d009228644c81214.tar.gz
blackbird-op-linux-09e8b813897a0f85bb401435d009228644c81214.zip
dm snapshot: fix error return code in snapshot_ctr
Return -ENOMEM instead of success if unable to allocate pending exception mempool in snapshot_ctr. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Cc: stable@vger.kernel.org Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-snap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index c0e07026a8d1..c434e5aab2df 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -1121,6 +1121,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
s->pending_pool = mempool_create_slab_pool(MIN_IOS, pending_cache);
if (!s->pending_pool) {
ti->error = "Could not allocate mempool for pending exceptions";
+ r = -ENOMEM;
goto bad_pending_pool;
}
OpenPOWER on IntegriCloud