Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: [PATCH linux-cr] cr: fs/inode.c: make sure ckpt_obj_register() actually runs
Date: Tue, 13 Apr 2010 15:35:35 -0500	[thread overview]
Message-ID: <20100413203535.GA9187@us.ibm.com> (raw)

[ 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-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
 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

             reply	other threads:[~2010-04-13 20:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-13 20:35 Serge E. Hallyn [this message]
     [not found] ` <20100413203535.GA9187-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-13 21:32   ` [PATCH linux-cr] cr: fs/inode.c: make sure ckpt_obj_register() actually runs Matt Helsley
     [not found]     ` <20100413213217.GF25363-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-04-13 22:09       ` Serge E. Hallyn
     [not found]         ` <20100413220931.GB13309-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-13 23:07           ` Matt Helsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100413203535.GA9187@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox