Whamcloud - gitweb
LU-2743 mgs: Add a missing rc reset
authorLi Wei <wei.g.li@intel.com>
Thu, 14 Mar 2013 15:02:12 +0000 (23:02 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Mar 2013 18:30:44 +0000 (14:30 -0400)
Current mgs_write_log_target() does not reset rc when EALREADY is
found.  This may cause the positive errno to leak to upper layers and
eventually to wire.  This patch adds the missing rc reset.

Change-Id: I0ba8a0decdb9583224a5de02f630742ae94fff39
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5730
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/mgs/mgs_llog.c

index b59a9d0..f8ef8ad 100644 (file)
@@ -3631,6 +3631,7 @@ int mgs_write_log_target(const struct lu_env *env,
                   get repeat setup instructions for already running
                   osc's. So don't update the client/mdt logs. */
                mti->mti_flags &= ~LDD_F_UPDATE;
+               rc = 0;
        }
 
        mutex_lock(&fsdb->fsdb_mutex);