]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: disable sysfs for < 2.6.25
authorSage Weil <sage@newdream.net>
Tue, 29 Apr 2008 21:08:40 +0000 (14:08 -0700)
committerSage Weil <sage@newdream.net>
Tue, 29 Apr 2008 21:08:40 +0000 (14:08 -0700)
src/kernel/client.c
src/kernel/super.c

index e7a78699cce6bc288d64511982a9bb7af3e6192a..5aed7698ed27d6f0e46df207553825f859cb66dc 100644 (file)
@@ -170,9 +170,11 @@ static void handle_monmap(struct ceph_client *client, struct ceph_msg *msg)
                     le64_to_cpu(client->monc.monmap->fsid.major),
                     le64_to_cpu(client->monc.monmap->fsid.minor));
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
                client->client_kobj = kobject_create_and_add(name, ceph_kobj);
                //client->fsid_kobj = kobject_create_and_add("fsid", 
                //client->client_kobj);
+#endif
        }
 }
 
@@ -251,8 +253,10 @@ void ceph_destroy_client(struct ceph_client *cl)
        /* unmount */
        /* ... */
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
        if (cl->client_kobj)
                kobject_put(cl->client_kobj);
+#endif
        if (cl->wb_wq)
                destroy_workqueue(cl->wb_wq);
        ceph_messenger_destroy(cl->msgr);
index 2a7218d99a09971a536d7e296d337f862643296f..354c809b9ac4cfbd0bb59eea3423b7e7201299a6 100644 (file)
@@ -563,9 +563,11 @@ static int __init init_ceph(void)
        dout(1, "init_ceph\n");
        spin_lock_init(&ceph_client_spinlock);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
        ceph_kobj = kobject_create_and_add("ceph", fs_kobj);
        if (!ceph_kobj)
                return -ENOMEM;
+#endif
        
        ceph_fs_proc_init();
 
@@ -583,8 +585,10 @@ static void __exit exit_ceph(void)
 {
        dout(1, "exit_ceph\n");
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
        kobject_put(ceph_kobj);
        ceph_kobj = 0;
+#endif
 
        unregister_filesystem(&ceph_fs_type);
        destroy_inodecache();