Commit 016e92da authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds

autofs: small cleanup in autofs_getpath()

We don't set "*name" so it's slightly nicer to just pass "name" instead
of "&name".

Link: http://lkml.kernel.org/r/20180531064736.lnisb55eajwjynvk@kili.mountainSigned-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: default avatarIan Kent <raven@themaw.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6471e938
...@@ -179,7 +179,7 @@ static void autofs_notify_daemon(struct autofs_sb_info *sbi, ...@@ -179,7 +179,7 @@ static void autofs_notify_daemon(struct autofs_sb_info *sbi,
} }
static int autofs_getpath(struct autofs_sb_info *sbi, static int autofs_getpath(struct autofs_sb_info *sbi,
struct dentry *dentry, char **name) struct dentry *dentry, char *name)
{ {
struct dentry *root = sbi->sb->s_root; struct dentry *root = sbi->sb->s_root;
struct dentry *tmp; struct dentry *tmp;
...@@ -189,7 +189,7 @@ static int autofs_getpath(struct autofs_sb_info *sbi, ...@@ -189,7 +189,7 @@ static int autofs_getpath(struct autofs_sb_info *sbi,
unsigned seq; unsigned seq;
rename_retry: rename_retry:
buf = *name; buf = name;
len = 0; len = 0;
seq = read_seqbegin(&rename_lock); seq = read_seqbegin(&rename_lock);
...@@ -395,7 +395,7 @@ int autofs_wait(struct autofs_sb_info *sbi, ...@@ -395,7 +395,7 @@ int autofs_wait(struct autofs_sb_info *sbi,
if (IS_ROOT(dentry) && autofs_type_trigger(sbi->type)) if (IS_ROOT(dentry) && autofs_type_trigger(sbi->type))
qstr.len = sprintf(name, "%p", dentry); qstr.len = sprintf(name, "%p", dentry);
else { else {
qstr.len = autofs_getpath(sbi, dentry, &name); qstr.len = autofs_getpath(sbi, dentry, name);
if (!qstr.len) { if (!qstr.len) {
kfree(name); kfree(name);
return -ENOENT; return -ENOENT;
......
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