[Devel] [PATCH linux-cr] cr: fs/inode.c: make sure ckpt_obj_register() actually runs
Serge E. Hallyn
serue at us.ibm.com
Tue Apr 13 13:35:35 PDT 2010
[ This is against Matt's code-shuffled patchset ]
So put it in its own, explicitly-called init function.
Without this, on my s390x sles11 system CKPT_OBJ_INODE does not,
in fact, get registered. With, it does, and cr_tests/bashckpt
passes.
Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
---
fs/inode.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index 1fcaf64..5121790 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1582,6 +1582,15 @@ static const struct ckpt_obj_ops ckpt_obj_inode_ops = {
.ref_drop = obj_inode_drop,
.ref_grab = obj_inode_grab,
};
+
+static int inode_ckpt_init(void)
+{
+ int ret = ckpt_obj_register(&ckpt_obj_inode_ops);
+ printk(KERN_NOTICE "%s: ckpt_obj_register for inode returned %d\n",
+ __func__, ret);
+ return ret;
+}
+__initcall(inode_ckpt_init);
#endif
void __init inode_init(void)
@@ -1613,10 +1622,6 @@ void __init inode_init(void)
for (loop = 0; loop < (1 << i_hash_shift); loop++)
INIT_HLIST_HEAD(&inode_hashtable[loop]);
-
-#ifdef CONFIG_CHECKPOINT
- ckpt_obj_register(&ckpt_obj_inode_ops);
-#endif
}
void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
--
1.7.0.4
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list