Whamcloud - gitweb
LU-9679 lustre: avoid cast of file->private_data 51/36651/4
authorMr NeilBrown <neilb@suse.de>
Sun, 3 Nov 2019 23:02:58 +0000 (10:02 +1100)
committerOleg Drokin <green@whamcloud.com>
Fri, 14 Feb 2020 05:49:28 +0000 (05:49 +0000)
commitf07508d17b49574c7ea47a855c6e8af2b23c3add
tree3d288de37b55decaa4a34d49a75b0ccb75d62184
parente07d4a58206756252c28b51048057c87a7cdb3c6
LU-9679 lustre: avoid cast of file->private_data

Instead of
  foo = ((struct seq_file*)file->private_data)->private;
use
  struct seq_file *m = file->private_data;
  foo = m->private;

Many places is lustre use this second style already.
It is much less noisy and prefered for upstream Linux.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I9a7adb102687496f43bab099b1ca584955f040c9
Reviewed-on: https://review.whamcloud.com/36651
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
12 files changed:
lustre/fid/lproc_fid.c
lustre/fld/lproc_fld.c
lustre/ldlm/ldlm_resource.c
lustre/lov/lproc_lov.c
lustre/mdc/lproc_mdc.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/lu_ref.c
lustre/osc/lproc_osc.c
lustre/ptlrpc/nrs_crr.c
lustre/ptlrpc/nrs_tbf.c
lustre/quota/qmt_pool.c
lustre/quota/qsd_lib.c