Commit 75e8defb authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds

[PATCH] uml: hostfs variable renaming

* rename name to host_root_path
* rename data to req_root.
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 622e6969
...@@ -938,7 +938,7 @@ static const struct address_space_operations hostfs_link_aops = { ...@@ -938,7 +938,7 @@ static const struct address_space_operations hostfs_link_aops = {
static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent) static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
{ {
struct inode *root_inode; struct inode *root_inode;
char *name, *data = d; char *host_root_path, *req_root = d;
int err; int err;
sb->s_blocksize = 1024; sb->s_blocksize = 1024;
...@@ -947,16 +947,16 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent) ...@@ -947,16 +947,16 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
sb->s_op = &hostfs_sbops; sb->s_op = &hostfs_sbops;
/* NULL is printed as <NULL> by sprintf: avoid that. */ /* NULL is printed as <NULL> by sprintf: avoid that. */
if (data == NULL) if (req_root == NULL)
data = ""; req_root = "";
err = -ENOMEM; err = -ENOMEM;
name = kmalloc(strlen(root_ino) + 1 host_root_path = kmalloc(strlen(root_ino) + 1
+ strlen(data) + 1, GFP_KERNEL); + strlen(req_root) + 1, GFP_KERNEL);
if(name == NULL) if(host_root_path == NULL)
goto out; goto out;
sprintf(name, "%s/%s", root_ino, data); sprintf(host_root_path, "%s/%s", root_ino, req_root);
root_inode = iget(sb, 0); root_inode = iget(sb, 0);
if(root_inode == NULL) if(root_inode == NULL)
...@@ -966,10 +966,10 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent) ...@@ -966,10 +966,10 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
if(err) if(err)
goto out_put; goto out_put;
HOSTFS_I(root_inode)->host_filename = name; HOSTFS_I(root_inode)->host_filename = host_root_path;
/* Avoid that in the error path, iput(root_inode) frees again name through /* Avoid that in the error path, iput(root_inode) frees again
* hostfs_destroy_inode! */ * host_root_path through hostfs_destroy_inode! */
name = NULL; host_root_path = NULL;
err = -ENOMEM; err = -ENOMEM;
sb->s_root = d_alloc_root(root_inode); sb->s_root = d_alloc_root(root_inode);
...@@ -989,7 +989,7 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent) ...@@ -989,7 +989,7 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
out_put: out_put:
iput(root_inode); iput(root_inode);
out_free: out_free:
kfree(name); kfree(host_root_path);
out: out:
return(err); return(err);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment