aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs/namei.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2017-04-15 08:54:36 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-26 23:54:05 -0400
commitf1bf90724de652efdf493ea877ee050e7e6091c4 (patch)
tree7ffddf20bfec0950cf22cbfd9b1b7fd7512a5ccf /fs/affs/namei.c
parentLinux 4.11-rc7 (diff)
downloadlinux-dev-f1bf90724de652efdf493ea877ee050e7e6091c4.tar.xz
linux-dev-f1bf90724de652efdf493ea877ee050e7e6091c4.zip
fs/affs: bugfix: make symbolic links work again
AFFS symbolic links were broken since kernel 2.6.29 Problem was bisected to the following commit ebd09abbd969 ("vfs: ensure page symlinks are NUL-terminated") commit 035146851cfa ("vfs: introduce helper function to safely NUL-terminate symlinks") AFFS wasn't setting inode size when reading symbolic link from disk or creating a new one. Result was zero allocation in pagecache. ln -s file symlink ls -lrt file symlink -> This patch adds inode isize information on inode get and symbolic link addition. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/affs/namei.c')
-rw-r--r--fs/affs/namei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index 96dd1d09a273..b02da4d421cc 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -365,6 +365,7 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
symname++;
}
*p = 0;
+ inode->i_size = i + 1;
mark_buffer_dirty_inode(bh, inode);
affs_brelse(bh);
mark_inode_dirty(inode);