From b59fe845916db1812473c9310e490b6c375d6255 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 4 Aug 2013 09:10:48 +0800 Subject: [PATCH] staging: lustre: remove proc_dir_entry_t typedef Use struct proc_dir_entry like the rest of the kernel does. Cc: Peng Tao Cc: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- .../include/linux/libcfs/linux/linux-prim.h | 5 ---- .../staging/lustre/lustre/fld/fld_internal.h | 2 +- .../staging/lustre/lustre/fld/fld_request.c | 2 +- .../lustre/lustre/include/lprocfs_status.h | 30 +++++++++---------- .../lustre/lustre/include/lustre_dlm.h | 2 +- .../lustre/lustre/include/lustre_fid.h | 4 +-- .../lustre/lustre/include/lustre_fld.h | 4 +-- .../lustre/lustre/include/lustre_net.h | 2 +- .../lustre/lustre/include/lustre_quota.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 12 ++++---- .../lustre/lustre/ldlm/ldlm_internal.h | 4 +-- .../staging/lustre/lustre/ldlm/ldlm_pool.c | 2 +- .../lustre/lustre/ldlm/ldlm_resource.c | 8 ++--- .../staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 6 ++-- .../lustre/lustre/obdclass/lprocfs_status.c | 8 ++--- .../staging/lustre/lustre/ptlrpc/service.c | 2 +- 18 files changed, 47 insertions(+), 52 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h index 383198acb1f4..1ec4ca1a6e32 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h @@ -80,9 +80,4 @@ LL_PROC_PROTO(name) \ __##name); \ } -/* - * Proc file system APIs - */ -typedef struct proc_dir_entry proc_dir_entry_t; - #endif diff --git a/drivers/staging/lustre/lustre/fld/fld_internal.h b/drivers/staging/lustre/lustre/fld/fld_internal.h index 6e7ca9efe337..56686b138ac1 100644 --- a/drivers/staging/lustre/lustre/fld/fld_internal.h +++ b/drivers/staging/lustre/lustre/fld/fld_internal.h @@ -190,5 +190,5 @@ fld_target_name(struct lu_fld_target *tar) return (const char *)tar->ft_exp->exp_obd->obd_name; } -extern proc_dir_entry_t *fld_type_proc_dir; +extern struct proc_dir_entry *fld_type_proc_dir; #endif /* __FLD_INTERNAL_H */ diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c index a08867ab63bf..078e98bda684 100644 --- a/drivers/staging/lustre/lustre/fld/fld_request.c +++ b/drivers/staging/lustre/lustre/fld/fld_request.c @@ -277,7 +277,7 @@ int fld_client_del_target(struct lu_client_fld *fld, __u64 idx) EXPORT_SYMBOL(fld_client_del_target); #ifdef LPROCFS -proc_dir_entry_t *fld_type_proc_dir = NULL; +struct proc_dir_entry *fld_type_proc_dir = NULL; static int fld_client_proc_init(struct lu_client_fld *fld) { diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index d7f1be96189b..56b05728f611 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -345,7 +345,7 @@ enum { #define EXTRA_FIRST_OPC LDLM_GLIMPSE_ENQUEUE /* class_obd.c */ -extern proc_dir_entry_t *proc_lustre_root; +extern struct proc_dir_entry *proc_lustre_root; struct obd_device; struct obd_histogram; @@ -550,11 +550,11 @@ extern void lprocfs_free_md_stats(struct obd_device *obddev); struct obd_export; struct nid_stat; extern int lprocfs_add_clear_entry(struct obd_device * obd, - proc_dir_entry_t *entry); + struct proc_dir_entry *entry); extern int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *peer_nid, int *newnid); extern int lprocfs_exp_cleanup(struct obd_export *exp); -extern proc_dir_entry_t *lprocfs_add_simple(struct proc_dir_entry *root, +extern struct proc_dir_entry *lprocfs_add_simple(struct proc_dir_entry *root, char *name, void *data, struct file_operations *fops); @@ -567,27 +567,27 @@ lprocfs_nid_stats_clear_write(struct file *file, const char *buffer, unsigned long count, void *data); extern int lprocfs_nid_stats_clear_read(struct seq_file *m, void *data); -extern int lprocfs_register_stats(proc_dir_entry_t *root, const char *name, +extern int lprocfs_register_stats(struct proc_dir_entry *root, const char *name, struct lprocfs_stats *stats); /* lprocfs_status.c */ -extern int lprocfs_add_vars(proc_dir_entry_t *root, +extern int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *var, void *data); -extern proc_dir_entry_t *lprocfs_register(const char *name, - proc_dir_entry_t *parent, +extern struct proc_dir_entry *lprocfs_register(const char *name, + struct proc_dir_entry *parent, struct lprocfs_vars *list, void *data); -extern void lprocfs_remove(proc_dir_entry_t **root); +extern void lprocfs_remove(struct proc_dir_entry **root); extern void lprocfs_remove_proc_entry(const char *name, struct proc_dir_entry *parent); extern int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list); extern int lprocfs_obd_cleanup(struct obd_device *obd); -extern int lprocfs_seq_create(proc_dir_entry_t *parent, const char *name, +extern int lprocfs_seq_create(struct proc_dir_entry *parent, const char *name, umode_t mode, const struct file_operations *seq_fops, void *data); @@ -838,7 +838,7 @@ static inline void lprocfs_clear_stats(struct lprocfs_stats *stats) { return; } static inline void lprocfs_free_stats(struct lprocfs_stats **stats) { return; } -static inline int lprocfs_register_stats(proc_dir_entry_t *root, +static inline int lprocfs_register_stats(struct proc_dir_entry *root, const char *name, struct lprocfs_stats *stats) { return 0; } @@ -869,7 +869,7 @@ static inline int lprocfs_exp_setup(struct obd_export *exp,lnet_nid_t *peer_nid, { return 0; } static inline int lprocfs_exp_cleanup(struct obd_export *exp) { return 0; } -static inline proc_dir_entry_t * +static inline struct proc_dir_entry * lprocfs_add_simple(struct proc_dir_entry *root, char *name, void *data, struct file_operations *fops) {return 0; } @@ -887,15 +887,15 @@ static inline int lprocfs_nid_stats_clear_read(struct seq_file *m, void *data) { return 0; } -static inline proc_dir_entry_t * -lprocfs_register(const char *name, proc_dir_entry_t *parent, +static inline struct proc_dir_entry * +lprocfs_register(const char *name, struct proc_dir_entry *parent, struct lprocfs_vars *list, void *data) { return NULL; } -static inline int lprocfs_add_vars(proc_dir_entry_t *root, +static inline int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *var, void *data) { return 0; } -static inline void lprocfs_remove(proc_dir_entry_t **root) +static inline void lprocfs_remove(struct proc_dir_entry **root) { return; } static inline void lprocfs_remove_proc_entry(const char *name, struct proc_dir_entry *parent) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 66db562c5caa..7020d9cd9eb2 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -235,7 +235,7 @@ struct ldlm_pool_ops { */ struct ldlm_pool { /** Pool proc directory. */ - proc_dir_entry_t *pl_proc_dir; + struct proc_dir_entry *pl_proc_dir; /** Pool name, must be long enough to hold compound proc entry name. */ char pl_name[100]; /** Lock for protecting SLV/CLV updates. */ diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h b/drivers/staging/lustre/lustre/include/lustre_fid.h index 655119eda9a1..d9d5814e318d 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fid.h +++ b/drivers/staging/lustre/lustre/include/lustre_fid.h @@ -346,7 +346,7 @@ struct lu_client_seq { struct lu_seq_range lcs_space; /* Seq related proc */ - proc_dir_entry_t *lcs_proc_dir; + struct proc_dir_entry *lcs_proc_dir; /* This holds last allocated fid in last obtained seq */ struct lu_fid lcs_fid; @@ -393,7 +393,7 @@ struct lu_server_seq { struct dt_object *lss_obj; /* Seq related proc */ - proc_dir_entry_t *lss_proc_dir; + struct proc_dir_entry *lss_proc_dir; /* LUSTRE_SEQ_SERVER or LUSTRE_SEQ_CONTROLLER */ enum lu_mgr_type lss_type; diff --git a/drivers/staging/lustre/lustre/include/lustre_fld.h b/drivers/staging/lustre/lustre/include/lustre_fld.h index 94b697dbe713..550fff587458 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fld.h +++ b/drivers/staging/lustre/lustre/include/lustre_fld.h @@ -72,7 +72,7 @@ struct lu_fld_target { struct lu_server_fld { /** * Fld dir proc entry. */ - proc_dir_entry_t *lsf_proc_dir; + struct proc_dir_entry *lsf_proc_dir; /** * /fld file object device */ @@ -100,7 +100,7 @@ struct lu_server_fld { struct lu_client_fld { /** * Client side proc entry. */ - proc_dir_entry_t *lcf_proc_dir; + struct proc_dir_entry *lcf_proc_dir; /** * List of exports client FLD knows about. */ diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index ce41bf9cc465..e947002fae04 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -2489,7 +2489,7 @@ struct ptlrpc_service { /** limit of threads number for each partition */ int srv_nthrs_cpt_limit; /** Root of /proc dir tree for this service */ - proc_dir_entry_t *srv_procroot; + struct proc_dir_entry *srv_procroot; /** Pointer to statistic data for this service */ struct lprocfs_stats *srv_stats; /** # hp per lp reqs to handle */ diff --git a/drivers/staging/lustre/lustre/include/lustre_quota.h b/drivers/staging/lustre/lustre/include/lustre_quota.h index 1c3041f50049..71b5d97e0343 100644 --- a/drivers/staging/lustre/lustre/include/lustre_quota.h +++ b/drivers/staging/lustre/lustre/include/lustre_quota.h @@ -168,7 +168,7 @@ struct qsd_instance; * enforcement. Arguments are documented where each function is defined. */ struct qsd_instance *qsd_init(const struct lu_env *, char *, struct dt_device *, - proc_dir_entry_t *); + struct proc_dir_entry *); int qsd_prepare(const struct lu_env *, struct qsd_instance *); int qsd_start(const struct lu_env *, struct qsd_instance *); void qsd_fini(const struct lu_env *, struct qsd_instance *); diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 5cf687f1557b..a6122559d55d 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -238,7 +238,7 @@ struct obd_type { struct list_head typ_chain; struct obd_ops *typ_dt_ops; struct md_ops *typ_md_ops; - proc_dir_entry_t *typ_procroot; + struct proc_dir_entry *typ_procroot; char *typ_name; int typ_refcnt; struct lu_device_type *typ_lu; @@ -537,7 +537,7 @@ struct pool_desc { struct lov_qos_rr pool_rr; /* round robin qos */ struct hlist_node pool_hash; /* access by poolname */ struct list_head pool_list; /* serial access */ - proc_dir_entry_t *pool_proc_entry; /* file in /proc */ + struct proc_dir_entry *pool_proc_entry; /* file in /proc */ struct obd_device *pool_lobd; /* obd of the lov/lod to which * this pool belongs */ }; @@ -558,7 +558,7 @@ struct lov_obd { int lov_pool_count; cfs_hash_t *lov_pools_hash_body; /* used for key access */ struct list_head lov_pool_list; /* used for sequential access */ - proc_dir_entry_t *lov_pool_proc_entry; + struct proc_dir_entry *lov_pool_proc_entry; enum lustre_sec_part lov_sp_me; /* Cached LRU pages from upper layer */ @@ -931,10 +931,10 @@ struct obd_device { unsigned int md_cntr_base; struct lprocfs_stats *md_stats; - proc_dir_entry_t *obd_proc_entry; + struct proc_dir_entry *obd_proc_entry; void *obd_proc_private; /* type private PDEs */ - proc_dir_entry_t *obd_proc_exports_entry; - proc_dir_entry_t *obd_svc_procroot; + struct proc_dir_entry *obd_proc_exports_entry; + struct proc_dir_entry *obd_svc_procroot; struct lprocfs_stats *obd_svc_stats; atomic_t obd_evict_inprogress; wait_queue_head_t obd_evict_inprogress_waitq; diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h index bf6f00341a76..8cd79633dea3 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h @@ -192,8 +192,8 @@ void ldlm_destroy_flock_export(struct obd_export *exp); void l_check_ns_lock(struct ldlm_namespace *ns); void l_check_no_ns_lock(struct ldlm_namespace *ns); -extern proc_dir_entry_t *ldlm_svc_proc_dir; -extern proc_dir_entry_t *ldlm_type_proc_dir; +extern struct proc_dir_entry *ldlm_svc_proc_dir; +extern struct proc_dir_entry *ldlm_type_proc_dir; struct ldlm_state { struct ptlrpc_service *ldlm_cb_service; diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index 0593982f61c2..454027d68d54 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c @@ -142,7 +142,7 @@ */ #define LDLM_POOL_SLV_SHIFT (10) -extern proc_dir_entry_t *ldlm_ns_proc_dir; +extern struct proc_dir_entry *ldlm_ns_proc_dir; static inline __u64 dru(__u64 val, __u32 shift, int round_up) { diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 78327cf40072..208751a154b3 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -62,9 +62,9 @@ LIST_HEAD(ldlm_cli_active_namespace_list); /* Client namespaces that don't have any locks in them */ LIST_HEAD(ldlm_cli_inactive_namespace_list); -proc_dir_entry_t *ldlm_type_proc_dir = NULL; -proc_dir_entry_t *ldlm_ns_proc_dir = NULL; -proc_dir_entry_t *ldlm_svc_proc_dir = NULL; +struct proc_dir_entry *ldlm_type_proc_dir = NULL; +struct proc_dir_entry *ldlm_ns_proc_dir = NULL; +struct proc_dir_entry *ldlm_svc_proc_dir = NULL; extern unsigned int ldlm_cancel_unused_locks_before_replay; @@ -329,7 +329,7 @@ int ldlm_namespace_proc_register(struct ldlm_namespace *ns) { struct lprocfs_vars lock_vars[2]; char lock_name[MAX_STRING_SIZE + 1]; - proc_dir_entry_t *ns_pde; + struct proc_dir_entry *ns_pde; LASSERT(ns != NULL); LASSERT(ns->ns_rs_hash != NULL); diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index db349f68e32e..d4d3c17547ca 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -851,7 +851,7 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent, struct lustre_sb_info *lsi = s2lsi(sb); struct ll_sb_info *sbi = ll_s2sbi(sb); struct obd_device *obd; - proc_dir_entry_t *dir; + struct proc_dir_entry *dir; char name[MAX_STRING_SIZE + 1], *ptr; int err, id, len, rc; diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index bd2575aed08d..c2866046fc38 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -673,7 +673,7 @@ static int lmv_disconnect(struct obd_export *exp) } if (obd->obd_proc_private) - lprocfs_remove((proc_dir_entry_t **)&obd->obd_proc_private); + lprocfs_remove((struct proc_dir_entry **)&obd->obd_proc_private); else CERROR("/proc/fs/lustre/%s/%s/target_obds missing\n", obd->obd_type->typ_name, obd->obd_name); diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 71f5ef16e83d..0b47aba1332a 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -131,7 +131,7 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, struct obd_device *tgt_obd; static struct obd_uuid lov_osc_uuid = { "LOV_OSC_UUID" }; struct obd_import *imp; - proc_dir_entry_t *lov_proc_dir; + struct proc_dir_entry *lov_proc_dir; int rc; if (!lov->lov_tgts[index]) @@ -193,7 +193,7 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, lov_proc_dir = obd->obd_proc_private; if (lov_proc_dir) { struct obd_device *osc_obd = lov->lov_tgts[index]->ltd_exp->exp_obd; - proc_dir_entry_t *osc_symlink; + struct proc_dir_entry *osc_symlink; LASSERT(osc_obd != NULL); LASSERT(osc_obd->obd_magic == OBD_DEVICE_MAGIC); @@ -273,7 +273,7 @@ static int lov_connect(const struct lu_env *env, static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt) { - proc_dir_entry_t *lov_proc_dir; + struct proc_dir_entry *lov_proc_dir; struct lov_obd *lov = &obd->u.lov; struct obd_device *osc_obd; int rc; diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index 6d9f25291757..a95f60a4f90e 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -68,11 +68,11 @@ EXPORT_SYMBOL(lprocfs_seq_release); /* lprocfs API calls */ -proc_dir_entry_t *lprocfs_add_simple(struct proc_dir_entry *root, +struct proc_dir_entry *lprocfs_add_simple(struct proc_dir_entry *root, char *name, void *data, struct file_operations *fops) { - proc_dir_entry_t *proc; + struct proc_dir_entry *proc; umode_t mode = 0; if (root == NULL || name == NULL || fops == NULL) @@ -1537,7 +1537,7 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid) { struct nid_stat *new_stat, *old_stat; struct obd_device *obd = NULL; - proc_dir_entry_t *entry; + struct proc_dir_entry *entry; char *buffer = NULL; int rc = 0; @@ -1899,7 +1899,7 @@ char *lprocfs_find_named_value(const char *buffer, const char *name, } EXPORT_SYMBOL(lprocfs_find_named_value); -int lprocfs_seq_create(proc_dir_entry_t *parent, +int lprocfs_seq_create(struct proc_dir_entry *parent, const char *name, umode_t mode, const struct file_operations *seq_fops, diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index 4f0118cc7546..ac8b5fd2300b 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c @@ -683,7 +683,7 @@ ptlrpc_service_part_init(struct ptlrpc_service *svc, */ struct ptlrpc_service * ptlrpc_register_service(struct ptlrpc_service_conf *conf, - proc_dir_entry_t *proc_entry) + struct proc_dir_entry *proc_entry) { struct ptlrpc_service_cpt_conf *cconf = &conf->psc_cpt; struct ptlrpc_service *service; -- 2.30.2