summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2008-07-23 21:30:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 10:47:31 -0700
commitef581a742874ebc4c28d24b374c78b762144ebdc (patch)
tree8dfced9c0fc8e18a3b81aac9fae2b843d251b8a6 /fs
parent2576737873dc1d9ea461a5955a5f6779b569a350 (diff)
downloadlinux-ef581a742874ebc4c28d24b374c78b762144ebdc.tar.bz2
autofs4: fix symlink name allocation
The length of the symlink name has been moved but it needs to be set before allocating space for it in the dentry info struct. This corrects a mistake in a recent patch. Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/autofs4/root.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index dbb70d5a4882..324290c68275 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -775,6 +775,7 @@ static int autofs4_dir_symlink(struct inode *dir,
list_del_init(&ino->active);
spin_unlock(&sbi->lookup_lock);
+ ino->size = strlen(symname);
cp = kmalloc(ino->size + 1, GFP_KERNEL);
if (!cp) {
if (!dentry->d_fsdata)
@@ -806,7 +807,6 @@ static int autofs4_dir_symlink(struct inode *dir,
atomic_inc(&p_ino->count);
ino->inode = inode;
- ino->size = strlen(symname);
ino->u.symlink = cp;
dir->i_mtime = CURRENT_TIME;