]) # LIBCFS_LINUX_BLK_INTEGRITY_HEADER
#
+# LIBCFS_PDE_DATA_EXISTS
+#
+# Linux commit v5.16-11573-g6dfbbae14a7b
+# introduce pde_data()
+# Linux commit v5.16-11574-g359745d78351
+# remove PDE_DATA()
+#
+AC_DEFUN([LIBCFS_PDE_DATA_EXISTS],[
+LB_CHECK_COMPILE([does function 'pde_data' exist],
+pde_data, [
+ #include <linux/proc_fs.h>
+ ],[
+ struct inode *inode = NULL;
+ void *data =pde_data(inode);
+ (void)data;
+ ],[
+ AC_DEFINE(HAVE_pde_data, 1, [function pde_data() available])
+ ],[
+ AC_DEFINE(pde_data(inode), PDE_DATA(inode),
+ [function pde_data() unavailable])
+ ])
+]) # LIBCFS_PDE_DATA_EXISTS
+
+#
# LIBCFS_PROG_LINUX
#
# LibCFS linux kernel checks
# 5.15
LIBCFS_PARAM_SET_UINT_MINMAX
LIBCFS_LINUX_BLK_INTEGRITY_HEADER
+# 5.17
+LIBCFS_PDE_DATA_EXISTS
]) # LIBCFS_PROG_LINUX
#
static int
kgnilnd_cksum_test_seq_open(struct inode *inode, struct file *file)
{
- return single_open(file, NULL, PDE_DATA(inode));
+ return single_open(file, NULL, pde_data(inode));
}
static const struct file_operations kgn_cksum_test_fops = {
static int
kgnilnd_stats_seq_open(struct inode *inode, struct file *file)
{
- return single_open(file, kgnilnd_stats_seq_show, PDE_DATA(inode));
+ return single_open(file, kgnilnd_stats_seq_show, pde_data(inode));
}
static const struct file_operations kgn_stats_fops = {
rc = seq_open(file, &kgn_smsg_sops);
if (rc == 0) {
sf = file->private_data;
- sf->private = PDE_DATA(inode);
+ sf->private = pde_data(inode);
}
return rc;
kgnilnd_peer_conns_seq_open(struct inode *inode, struct file *file)
{
return single_open(file, kgnilnd_proc_peer_conns_seq_show,
- PDE_DATA(inode));
+ pde_data(inode));
}
static const struct file_operations kgn_peer_conns_fops = {
rc = seq_open(file, &kgn_conn_sops);
if (rc == 0) {
sf = file->private_data;
- sf->private = PDE_DATA(inode);
+ sf->private = pde_data(inode);
}
return rc;
rc = seq_open(file, &kgn_peer_sops);
if (rc == 0) {
sf = file->private_data;
- sf->private = PDE_DATA(inode);
+ sf->private = pde_data(inode);
}
return rc;
{ \
return single_open(file, name##_seq_show, \
inode->i_private ? inode->i_private : \
- PDE_DATA(inode)); \
+ pde_data(inode)); \
} \
static const struct proc_ops name##_fops = { \
PROC_OWNER(THIS_MODULE) \
{ \
return single_open(file, NULL, \
inode->i_private ? inode->i_private : \
- PDE_DATA(inode)); \
+ pde_data(inode)); \
} \
static const struct proc_ops name##_##type##_fops = { \
.proc_open = name##_##type##_open, \
return rc;
seq = file->private_data;
- seq->private = PDE_DATA(inode);
+ seq->private = pde_data(inode);
return 0;
}
rc = seq_open(file, &pool_proc_ops);
if (!rc) {
struct seq_file *seq = file->private_data;
- seq->private = PDE_DATA(inode);
+ seq->private = pde_data(inode);
}
return rc;
}
return rc;
seq = file->private_data;
- seq->private = PDE_DATA(inode);
+ seq->private = pde_data(inode);
return 0;
}
return rc;
seq = file->private_data;
- seq->private = PDE_DATA(inode);
+ seq->private = pde_data(inode);
return 0;
}
rc = seq_open(file, &pool_proc_ops);
if (!rc) {
struct seq_file *s = file->private_data;
- s->private = PDE_DATA(inode);
+ s->private = pde_data(inode);
}
return rc;
}
return rc;
seq = file->private_data;
- seq->private = PDE_DATA(inode);
+ seq->private = pde_data(inode);
return 0;
}
return rc;
seq = file->private_data;
- seq->private = PDE_DATA(inode);
+ seq->private = pde_data(inode);
return 0;
}
if (rc)
return rc;
seq = file->private_data;
- seq->private = PDE_DATA(inode);
+ seq->private = pde_data(inode);
return 0;
}
if (rc)
return rc;
seq = file->private_data;
- seq->private = inode->i_private ? inode->i_private : PDE_DATA(inode);
+ seq->private = inode->i_private ? inode->i_private : pde_data(inode);
return 0;
}
int lprocfs_evict_client_open(struct inode *inode, struct file *f)
{
- struct obd_device *obd = PDE_DATA(file_inode(f));
+ struct obd_device *obd = pde_data(file_inode(f));
atomic_inc(&obd->obd_evict_inprogress);
return 0;
int lprocfs_evict_client_release(struct inode *inode, struct file *f)
{
- struct obd_device *obd = PDE_DATA(file_inode(f));
+ struct obd_device *obd = pde_data(file_inode(f));
atomic_dec(&obd->obd_evict_inprogress);
wake_up(&obd->obd_evict_inprogress_waitq);
*/
static int nodemap_idmap_open(struct inode *inode, struct file *file)
{
- return single_open(file, nodemap_idmap_show, PDE_DATA(inode));
+ return single_open(file, nodemap_idmap_show, pde_data(inode));
}
/**
*/
static int nodemap_ranges_open(struct inode *inode, struct file *file)
{
- return single_open(file, nodemap_ranges_show, PDE_DATA(inode));
+ return single_open(file, nodemap_ranges_show, pde_data(inode));
}
/**
*/
static int nodemap_exports_open(struct inode *inode, struct file *file)
{
- return single_open(file, nodemap_exports_show, PDE_DATA(inode));
+ return single_open(file, nodemap_exports_show, pde_data(inode));
}
/**
return -ENOMEM;
/* store pointer to object we would like to iterate over */
- lqp->lqp_obj = (struct dt_object *)PDE_DATA(inode);
+ lqp->lqp_obj = (struct dt_object *)pde_data(inode);
/* Initialize the common environment to be used in the seq operations */
rc = lu_env_init(&lqp->lqp_env, LCT_LOCAL);