]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: backport changes to kernel 2.6.25
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 17 Feb 2009 18:45:34 +0000 (10:45 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 17 Feb 2009 18:45:34 +0000 (10:45 -0800)
src/kernel/proc.c

index 7f462d0386dfb7c8d9929db50d74fee5622bdc55..6a0a0467e004d1d8f5659f9a17f96ece18a64f4e 100644 (file)
@@ -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)