Whamcloud - gitweb
LU-2743 llite: Fix a negative hpk_errval assignment
authorLi Wei <wei.g.li@intel.com>
Thu, 14 Mar 2013 14:52:35 +0000 (22:52 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Mar 2013 18:30:11 +0000 (14:30 -0400)
The hpk_errval field should store positve errnos.  This patch fixes a
place where errnos are assigned to hpk_errval as negative numbers.

Change-Id: I77b1f9e6a19a64aedcdcc5fe38b08babb810a472
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5729
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/llite/dir.c

index a3a514c..493996d 100644 (file)
@@ -1035,7 +1035,7 @@ static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy)
                        CDEBUG(D_HSM, "Could not read file data version. "
                                      "Request could not be confirmed.\n");
                        if (hpk.hpk_errval == 0)
-                               hpk.hpk_errval = rc;
+                               hpk.hpk_errval = -rc;
                        GOTO(progress, rc);
                }