From 2c3f3dc315565941262e980029c0f74ad118231a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 20 Dec 2019 23:43:32 -0500 Subject: switch rbd and libceph to p_log-based primitives Signed-off-by: Al Viro --- drivers/block/rbd.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 1dd758e8f955..596a1188d0c3 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -6363,10 +6363,9 @@ static int rbd_parse_param(struct fs_parameter *param, token = fs_parse(NULL, &rbd_parameters, param, &result); dout("%s fs_parse '%s' token %d\n", __func__, param->key, token); if (token < 0) { - if (token == -ENOPARAM) { - return invalf(NULL, "rbd: Unknown parameter '%s'", - param->key); - } + if (token == -ENOPARAM) + return inval_plog(&log, "Unknown parameter '%s'", + param->key); return token; } @@ -6379,9 +6378,8 @@ static int rbd_parse_param(struct fs_parameter *param, case Opt_alloc_size: if (result.uint_32 < SECTOR_SIZE) goto out_of_range; - if (!is_power_of_2(result.uint_32)) { - return invalf(NULL, "rbd: alloc_size must be a power of 2"); - } + if (!is_power_of_2(result.uint_32)) + return inval_plog(&log, "alloc_size must be a power of 2"); opt->alloc_size = result.uint_32; break; case Opt_lock_timeout: @@ -6417,7 +6415,7 @@ static int rbd_parse_param(struct fs_parameter *param, return 0; out_of_range: - return invalf(NULL, "rbd: %s out of range", param->key); + return inval_plog(&log, "%s out of range", param->key); } /* -- cgit v1.2.3-59-g8ed1b