Skip to content

Commit

Permalink
autofs: small cleanup in autofs_getpath()
Browse files Browse the repository at this point in the history
We don't set "*name" so it's slightly nicer to just pass "name" instead
of "&name".

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: "Eric W. Biederman" <[email protected]>
Acked-by: Ian Kent <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Dan Carpenter authored and torvalds committed Jun 8, 2018
1 parent 6471e93 commit 016e92d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/autofs/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static void autofs_notify_daemon(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 *tmp;
Expand All @@ -189,7 +189,7 @@ static int autofs_getpath(struct autofs_sb_info *sbi,
unsigned seq;

rename_retry:
buf = *name;
buf = name;
len = 0;

seq = read_seqbegin(&rename_lock);
Expand Down Expand Up @@ -395,7 +395,7 @@ int autofs_wait(struct autofs_sb_info *sbi,
if (IS_ROOT(dentry) && autofs_type_trigger(sbi->type))
qstr.len = sprintf(name, "%p", dentry);
else {
qstr.len = autofs_getpath(sbi, dentry, &name);
qstr.len = autofs_getpath(sbi, dentry, name);
if (!qstr.len) {
kfree(name);
return -ENOENT;
Expand Down

0 comments on commit 016e92d

Please sign in to comment.