From 266a66d35b416e98d0b754259209d0441fac4b04 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Wed, 19 Jan 2022 17:47:11 -0800 Subject: [PATCH] LU-13783 procfs: fix improper prop_ops fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The lod pool and nodemap proc_ops missed renaming the fields to start with .proc_*. On newer distros like Ubuntu 20.04 HWE you get the following compile error: lustre-release/lustre/ptlrpc/nodemap_lproc.c:686:3: error: ‘const struct proc_ops’ has no member named ‘open’ 686 | .open = nodemap_ranges_open, Lustre-change: https://review.whamcloud.com/43880 Lustre-commit: d106dfc1458702865118e73bfcdfc2ec2676a7d6 Test-Parameters: trivial Fixes: 13cd0f9f667 ("LU-13344 libcfs: Abstract proc_fs with proc_ops") Signed-off-by: James Simmons Change-Id: I5fff7519a801f585690d468255f7ca6c73adcc90 Reviewed-by: Andreas Dilger Reviewed-by: Sebastien Buisson Reviewed-on: https://review.whamcloud.com/46219 Tested-by: jenkins Tested-by: Maloo --- lustre/lod/lod_pool.c | 8 ++++---- lustre/ptlrpc/nodemap_lproc.c | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lustre/lod/lod_pool.c b/lustre/lod/lod_pool.c index 3638adc..599980f 100644 --- a/lustre/lod/lod_pool.c +++ b/lustre/lod/lod_pool.c @@ -319,10 +319,10 @@ static int pool_proc_open(struct inode *inode, struct file *file) } const static struct proc_ops pool_proc_operations = { - .open = pool_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, + .proc_open = pool_proc_open, + .proc_read = seq_read, + .proc_lseek = seq_lseek, + .proc_release = seq_release, }; /** diff --git a/lustre/ptlrpc/nodemap_lproc.c b/lustre/ptlrpc/nodemap_lproc.c index 3594333..295da97 100644 --- a/lustre/ptlrpc/nodemap_lproc.c +++ b/lustre/ptlrpc/nodemap_lproc.c @@ -734,24 +734,24 @@ LPROC_SEQ_FOPS_RO(nodemap_audit_mode); LPROC_SEQ_FOPS_RO(nodemap_forbid_encryption); static const struct proc_ops nodemap_ranges_fops = { - .open = nodemap_ranges_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release + .proc_open = nodemap_ranges_open, + .proc_read = seq_read, + .proc_lseek = seq_lseek, + .proc_release = single_release }; static const struct proc_ops nodemap_idmap_fops = { - .open = nodemap_idmap_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release + .proc_open = nodemap_idmap_open, + .proc_read = seq_read, + .proc_lseek = seq_lseek, + .proc_release = single_release }; static const struct proc_ops nodemap_exports_fops = { - .open = nodemap_exports_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release + .proc_open = nodemap_exports_open, + .proc_read = seq_read, + .proc_lseek = seq_lseek, + .proc_release = single_release }; static struct lprocfs_vars lprocfs_nodemap_vars[] = { -- 1.8.3.1