Whamcloud - gitweb
LU-6514 fid: remove misleading rc check in lprocfs_client_fid_width_seq_write 04/14604/5
authorOleg Drokin <oleg.drokin@intel.com>
Fri, 12 Jun 2015 13:48:13 +0000 (09:48 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 24 Jun 2015 02:23:40 +0000 (02:23 +0000)
At the very end of lprocfs_client_fid_width_seq_write in the success path
there is a very misleading rc check thta not only is out of place,
but also causes the reader to think what was the goal there.
It's after we already assign the requested variable too and only
controls the debug print.

Change-Id: I89b020b85bd8948c859fc3703f716ad8def387e1
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/14604
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
lustre/fid/lproc_fid.c

index bacaa8e..aa16d81 100644 (file)
@@ -573,10 +573,8 @@ lprocfs_client_fid_width_seq_write(struct file *file, const char __user *buffer,
        if (val <= max && val > 0) {
                seq->lcs_width = val;
 
-               if (rc == 0) {
-                       CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n",
-                              seq->lcs_name, seq->lcs_width);
-               }
+               CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n",
+                      seq->lcs_name, seq->lcs_width);
        }
        mutex_unlock(&seq->lcs_mutex);