summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2009-02-17 10:45:34 -0800
committerYehuda Sadeh <yehuda@hq.newdream.net>2009-02-17 10:45:34 -0800
commitd8ac8e5e5d0486b4f8d063d2709638031a6eddba (patch)
treef3bd3216de73e77d0b07399fffb5d60ff5a594ff
parentf62e4db41503d08650ac8c048bac54d4d2c2e2dd (diff)
downloadceph-d8ac8e5e5d0486b4f8d063d2709638031a6eddba.tar.gz
kclient: backport changes to kernel 2.6.25
-rw-r--r--src/kernel/proc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 7f462d0386d..6a0a0467e00 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -265,11 +265,24 @@ static const struct file_operations ceph_client_data_fops = {
void ceph_proc_register_client(struct ceph_client *client)
{
char str[16];
+ struct proc_dir_entry *p;
snprintf(str, sizeof(str), "%d", client->whoami);
client->proc_entry = proc_mkdir(str, proc_fs_ceph_clients);
- proc_create_data("data", 0, client->proc_entry, &ceph_client_data_fops, client);
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 25)
+ p = create_proc_entry("data", 0, client->proc_entry);
+#else
+ p = proc_create_data("data", 0, client->proc_entry, &ceph_client_data_fops, client);
+#endif
+ if (!p) {
+ derr(0, "couldn't create data proc entry\n");
+ }
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 25)
+ p->owner = THIS_MODULE;
+ p->proc_fops = &ceph_client_data_fops;
+ p->data = client;
+#endif
}
void ceph_proc_unregister_client(struct ceph_client *client)