Whamcloud - gitweb
LU-8360 llite: check return value for obd_set_info_async 25/21125/3
authorYang Sheng <yang.sheng@intel.com>
Fri, 1 Jul 2016 16:00:46 +0000 (00:00 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 11 Jul 2016 23:59:28 +0000 (23:59 +0000)
The return value is ignored in client_common_fill_super.
Restore to check it and error out.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: If8da955acc61212cf04b9600348875aed8f5cfb4
Reviewed-on: http://review.whamcloud.com/21125
Tested-by: Jenkins
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_lib.c

index 50cfce2..98b6a36 100644 (file)
@@ -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) {