From: Robin Dong <sanbai@xxxxxxxxxx> If dm-delay structure allocation failed, report more precise error information. If dm-flakey structure alocation failed, it will report wrong error information which should be fixed. Signed-off-by: Robin Dong <sanbai@xxxxxxxxxx> --- drivers/md/dm-delay.c | 2 +- drivers/md/dm-flakey.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index 496d5f3..dfc26f1 100644 --- a/drivers/md/dm-delay.c +++ b/drivers/md/dm-delay.c @@ -140,7 +140,7 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv) dc = kmalloc(sizeof(*dc), GFP_KERNEL); if (!dc) { - ti->error = "Cannot allocate context"; + ti->error = "Cannot allocate delay context"; return -ENOMEM; } diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c index 7fcf21c..9ab809f 100644 --- a/drivers/md/dm-flakey.c +++ b/drivers/md/dm-flakey.c @@ -176,7 +176,7 @@ static int flakey_ctr(struct dm_target *ti, unsigned int argc, char **argv) fc = kzalloc(sizeof(*fc), GFP_KERNEL); if (!fc) { - ti->error = "Cannot allocate linear context"; + ti->error = "Cannot allocate flakey context"; return -ENOMEM; } fc->start_time = jiffies; -- 1.7.1 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel