From: Ian Kent 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 Signed-off-by: Andrew Morton --- fs/autofs4/root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/autofs4/root.c~autofs4-use-look-aside-list-for-lookups-autofs4-fix-symlink-name-allocation fs/autofs4/root.c --- a/fs/autofs4/root.c~autofs4-use-look-aside-list-for-lookups-autofs4-fix-symlink-name-allocation +++ a/fs/autofs4/root.c @@ -775,6 +775,7 @@ static int autofs4_dir_symlink(struct in 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 in atomic_inc(&p_ino->count); ino->inode = inode; - ino->size = strlen(symname); ino->u.symlink = cp; dir->i_mtime = CURRENT_TIME; _