Whamcloud - gitweb
LU-7025 lfsck: Invalid return value assignment 42/16042/2
authorFan Yong <fan.yong@intel.com>
Wed, 15 Jul 2015 03:24:47 +0000 (11:24 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 24 Aug 2015 15:31:08 +0000 (15:31 +0000)
commit604c7396b25c8e3a8e3ecf415d9f6f2bf1cbc6fd
tree2f70a60001965b693ce8397052e2bcb2091f8c57
parent76e38a7f80f5180e5ab1ac7dd518a4bd1a43cf87
LU-7025 lfsck: Invalid return value assignment

In lfsck_layout_scan_stripes(), the following code section:
                if (lso == NULL) {
                        struct lu_attr *attr = &info->lti_la;

                        rc = dt_attr_get(env, parent, attr);
                        if (rc != 0) {
                                rc = PTR_ERR(lso);
                                goto next;
                        }
                        ...
                }
When dt_attr_get() returns failure, we should NOT assign the
"rc" as "PTR_ERR(lso)", instead, just use the current "rc".

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8237e1f79588b54c73398f20bd833e81787bf4a6
Reviewed-on: http://review.whamcloud.com/16042
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lfsck/lfsck_layout.c