summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-10 15:37:15 +0200
committerAlasdair G Kergon <agk@redhat.com>2013-05-10 15:37:15 +0200
commit09e8b813897a0f85bb401435d009228644c81214 (patch)
tree4ce61c46f1db01c6f15b34e15657606bacacd63c /drivers/md
parentdm cache: fix error return code in cache_create (diff)
downloadlinux-09e8b813897a0f85bb401435d009228644c81214.tar.xz
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;
}