summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-10 14:37:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-19 10:54:37 -0700
commitc89f6c7515b1713eebf62f67a48f9d6dcf5c3d94 (patch)
treedd332c6f02e5a80b0833ef6f6dfd1dfb45490864 /drivers
parenta85550214614cd7e66d995592dbd54b14db50c01 (diff)
downloadlinux-3.10-c89f6c7515b1713eebf62f67a48f9d6dcf5c3d94.tar.gz
linux-3.10-c89f6c7515b1713eebf62f67a48f9d6dcf5c3d94.tar.bz2
linux-3.10-c89f6c7515b1713eebf62f67a48f9d6dcf5c3d94.zip
dm snapshot: fix error return code in snapshot_ctr
commit 09e8b813897a0f85bb401435d009228644c81214 upstream. 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> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-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 6f758870fc1..ff62ddc660d 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -1117,6 +1117,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;
}