summaryrefslogtreecommitdiffstats
path: root/fs/hostfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-08-18 12:21:10 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-18 12:21:10 +0200
commit3b6036d148bad5bb7928b021a49bb9e395361084 (patch)
treef64408944d4ef7f74290a689750484f1fb473d20 /fs/hostfs
parenthostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy (diff)
downloadlinux-3b6036d148bad5bb7928b021a49bb9e395361084.tar.xz
linux-3b6036d148bad5bb7928b021a49bb9e395361084.zip
hostfs ->follow_link() braino
we want the assignment to err done inside the if () to be visible after it, so (re)declaring err inside if () body is wrong. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hostfs')
-rw-r--r--fs/hostfs/hostfs_kern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 77c4f6ee6c40..f7dc9b5f9ef8 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -876,7 +876,7 @@ static void *hostfs_follow_link(struct dentry *dentry, struct nameidata *nd)
char *path = dentry_name(dentry);
int err = -ENOMEM;
if (path) {
- int err = hostfs_do_readlink(path, link, PATH_MAX);
+ err = hostfs_do_readlink(path, link, PATH_MAX);
if (err == PATH_MAX)
err = -E2BIG;
__putname(path);