diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2008-10-07 22:18:52 +0200 |
---|---|---|
committer | Yehuda Sadeh <yehuda@hq.newdream.net> | 2008-10-07 22:18:52 +0200 |
commit | 13b1bf7c492003ba2dfa2786ba9ae728a2bfe65f (patch) | |
tree | 70fcc3b0fb458d6960195c595e95a57093351738 | |
parent | Merge branch 'writepage' into unstable (diff) | |
download | ceph-0.4.tar.xz ceph-0.4.zip |
kclient: initializing kaddr (merge fix)v0.4
-rw-r--r-- | src/kernel/messenger.c | 2 | ||||
-rw-r--r-- | src/kernel/super.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/kernel/messenger.c b/src/kernel/messenger.c index a2bd06b20c0..74dc92f161a 100644 --- a/src/kernel/messenger.c +++ b/src/kernel/messenger.c @@ -686,7 +686,7 @@ static int write_partial_msg_pages(struct ceph_connection *con, while (con->out_msg_pos.page < con->out_msg->nr_pages) { struct page *page = NULL; - void *kaddr; + void *kaddr = 0; mutex_lock(&msg->page_mutex); if (msg->pages) { diff --git a/src/kernel/super.c b/src/kernel/super.c index f06cfa0da60..233d97659e3 100644 --- a/src/kernel/super.c +++ b/src/kernel/super.c @@ -987,11 +987,14 @@ static int ceph_init_bdi(struct super_block *sb, struct ceph_client *client) err = bdi_init(&client->backing_dev_info); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) if (err < 0) return err; - return bdi_register_dev(&client->backing_dev_info, sb->s_dev); + err = bdi_register_dev(&client->backing_dev_info, sb->s_dev); +#endif + return err; } static int ceph_get_sb(struct file_system_type *fs_type, @@ -1059,7 +1062,9 @@ static void ceph_kill_sb(struct super_block *s) struct ceph_client *client = ceph_sb_to_client(s); dout(1, "kill_sb %p\n", s); ceph_mdsc_pre_umount(&client->mdsc); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) bdi_unregister(&client->backing_dev_info); +#endif kill_anon_super(s); /* will call put_super after sb is r/o */ bdi_destroy(&client->backing_dev_info); ceph_destroy_client(client); |