checkpoint: rename fs_mnt to root_fs_path
Subsystems (3)
PATCH 1/1 checkpoint: rename fs_mnt to root_fs_path
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/[email protected]>
--- 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(-)
checkpoint/checkpoint.c +2 -2
@@ -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);
checkpoint/files.c +3 -3
@@ -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;
checkpoint/sys.c +1 -1
@@ -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)
fs/pipe.c +1 -1
@@ -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; }
include/linux/checkpoint_types.h +1 -1
@@ -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 */
net/unix/checkpoint.c +1 -1
@@ -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;
Signature · 1 line
1.6.0.4
A message that is not in the archive (sent off-list or not yet received): 20091229211509.GA19720-r/[email protected]
Added, thanks.
Quoted 108 lines · Serge E. Hallyn
the
fs_mntis neither an fs nor an mnt, but rather the struct path* root of the root task in the checkpointed container. So call itroot_fs_path.Signed-off-by Serge E. Hallyn <serue-r/[email protected]>--- 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(-)checkpoint/checkpoint.c +2
-2@@ -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);checkpoint/files.c +3
-3@@ -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;checkpoint/sys.c +1
-1@@ -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)fs/pipe.c +1
-1@@ -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; }include/linux/checkpoint_types.h +1
-1@@ -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 */ net/unix/checkpoint.c +1
-1@@ -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;