All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: [PATCH] checkpoint: rename fs_mnt to root_fs_path
Date: Tue, 29 Dec 2009 15:15:09 -0600	[thread overview]
Message-ID: <20091229211509.GA19720@us.ibm.com> (raw)

the fs_mnt is neither an fs nor an mnt, but rather the struct path* root
of the root task in the checkpointed container.  So call it root_fs_path.

Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
 checkpoint/checkpoint.c          |    4 ++--
 checkpoint/files.c               |    6 +++---
 checkpoint/sys.c                 |    2 +-
 fs/pipe.c                        |    2 +-
 include/linux/checkpoint_types.h |    2 +-
 net/unix/checkpoint.c            |    2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/checkpoint/checkpoint.c b/checkpoint/checkpoint.c
index c345773..1eda48b 100644
--- a/checkpoint/checkpoint.c
+++ b/checkpoint/checkpoint.c
@@ -572,8 +572,8 @@ static int init_checkpoint_ctx(struct ckpt_ctx *ctx, pid_t pid)
 	task_lock(ctx->root_task);
 	fs = ctx->root_task->fs;
 	read_lock(&fs->lock);
-	ctx->fs_mnt = fs->root;
-	path_get(&ctx->fs_mnt);
+	ctx->root_fs_path = fs->root;
+	path_get(&ctx->root_fs_path);
 	read_unlock(&fs->lock);
 	task_unlock(ctx->root_task);
 
diff --git a/checkpoint/files.c b/checkpoint/files.c
index d6cf945..03fcd1d 100644
--- a/checkpoint/files.c
+++ b/checkpoint/files.c
@@ -213,7 +213,7 @@ int generic_file_checkpoint(struct ckpt_ctx *ctx, struct file *file)
 	ret = ckpt_write_obj(ctx, &h->common.h);
 	if (ret < 0)
 		goto out;
-	ret = checkpoint_fname(ctx, &file->f_path, &ctx->fs_mnt);
+	ret = checkpoint_fname(ctx, &file->f_path, &ctx->root_fs_path);
  out:
 	ckpt_hdr_put(ctx, h);
 	return ret;
@@ -489,12 +489,12 @@ int checkpoint_obj_task_fs(struct ckpt_ctx *ctx, struct fs_struct *fs)
 	if (!fs)
 		return -ENOMEM;
 
-	ret = checkpoint_fname(ctx, &fscopy->root, &ctx->fs_mnt);
+	ret = checkpoint_fname(ctx, &fscopy->root, &ctx->root_fs_path);
 	if (ret < 0) {
 		ckpt_err(ctx, ret, "%(T)writing name of fs root");
 		goto out;
 	}
-	ret = checkpoint_fname(ctx, &fscopy->pwd, &ctx->fs_mnt);
+	ret = checkpoint_fname(ctx, &fscopy->pwd, &ctx->root_fs_path);
 	if (ret < 0) {
 		ckpt_err(ctx, ret, "%(T)writing name of pwd");
 		goto out;
diff --git a/checkpoint/sys.c b/checkpoint/sys.c
index 749e2fd..e332827 100644
--- a/checkpoint/sys.c
+++ b/checkpoint/sys.c
@@ -229,7 +229,7 @@ static void ckpt_ctx_free(struct ckpt_ctx *ctx)
 		fput(ctx->logfile);
 
 	ckpt_obj_hash_free(ctx);
-	path_put(&ctx->fs_mnt);
+	path_put(&ctx->root_fs_path);
 	ckpt_pgarr_free(ctx);
 
 	if (ctx->tasks_arr)
diff --git a/fs/pipe.c b/fs/pipe.c
index b5d0aea..51eb174 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -895,7 +895,7 @@ static int pipe_file_checkpoint(struct ckpt_ctx *ctx, struct file *file)
 
 	/* FIFO also needs a file name */
 	if (h->common.f_type == CKPT_FILE_FIFO) {
-		ret = checkpoint_fname(ctx, &file->f_path, &ctx->fs_mnt);
+		ret = checkpoint_fname(ctx, &file->f_path, &ctx->root_fs_path);
 		if (ret < 0)
 			goto out;
 	}
diff --git a/include/linux/checkpoint_types.h b/include/linux/checkpoint_types.h
index f95c3ff..be728be 100644
--- a/include/linux/checkpoint_types.h
+++ b/include/linux/checkpoint_types.h
@@ -59,7 +59,7 @@ struct ckpt_ctx {
 	struct deferqueue_head *deferqueue;	/* deferred c/r work */
 	struct deferqueue_head *files_deferq;	/* deferred file-table work */
 
-	struct path fs_mnt;     /* container root (FIXME) */
+	struct path root_fs_path;     /* container root (FIXME) */
 
 	struct task_struct *tsk;/* checkpoint: current target task */
 	char err_string[256];	/* checkpoint: error string */
diff --git a/net/unix/checkpoint.c b/net/unix/checkpoint.c
index b6f6af3..90415b0 100644
--- a/net/unix/checkpoint.c
+++ b/net/unix/checkpoint.c
@@ -96,7 +96,7 @@ static int unix_write_cwd(struct ckpt_ctx *ctx,
 	path.dentry = unix_sk(sk)->dentry;
 	path.mnt = unix_sk(sk)->mnt;
 
-	fqpath = ckpt_fill_fname(&path, &ctx->fs_mnt, buf, &len);
+	fqpath = ckpt_fill_fname(&path, &ctx->root_fs_path, buf, &len);
 	if (IS_ERR(fqpath)) {
 		ret = PTR_ERR(fqpath);
 		goto out;
-- 
1.6.0.4

             reply	other threads:[~2009-12-29 21:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29 21:15 Serge E. Hallyn [this message]
     [not found] ` <20091229211509.GA19720-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-20 16:56   ` [PATCH] checkpoint: rename fs_mnt to root_fs_path Oren Laadan

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=20091229211509.GA19720@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=orenl-eQaUEPhvms7ENvBUuze7eA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.