From a04d586405b7fa8aaa2f033f5b6b865c475e7ec8 Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Sat, 2 Jul 2016 00:00:46 +0800 Subject: [PATCH] LU-8360 llite: check return value for obd_set_info_async The return value is ignored in client_common_fill_super. Restore to check it and error out. Signed-off-by: Yang Sheng Change-Id: If8da955acc61212cf04b9600348875aed8f5cfb4 Reviewed-on: http://review.whamcloud.com/21125 Tested-by: Jenkins Reviewed-by: Emoly Liu Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/llite/llite_lib.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 50cfce2..98b6a36 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -527,11 +527,21 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, err = obd_set_info_async(NULL, sbi->ll_dt_exp, sizeof(KEY_CHECKSUM), KEY_CHECKSUM, sizeof(checksum), &checksum, NULL); + if (err) { + CERROR("%s: Set checksum failed: rc = %d\n", + sbi->ll_dt_exp->exp_obd->obd_name, err); + GOTO(out_root, err); + } cl_sb_init(sb); err = obd_set_info_async(NULL, sbi->ll_dt_exp, sizeof(KEY_CACHE_SET), KEY_CACHE_SET, sizeof(*sbi->ll_cache), sbi->ll_cache, NULL); + if (err) { + CERROR("%s: Set cache_set failed: rc = %d\n", + sbi->ll_dt_exp->exp_obd->obd_name, err); + GOTO(out_root, err); + } sb->s_root = d_make_root(root); if (sb->s_root == NULL) { -- 1.8.3.1