summaryrefslogtreecommitdiff
path: root/fs/affs/inode.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2017-04-15 09:54:36 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-27 06:54:05 +0300
commitf1bf90724de652efdf493ea877ee050e7e6091c4 (patch)
tree7ffddf20bfec0950cf22cbfd9b1b7fd7512a5ccf /fs/affs/inode.c
parent4f7d029b9bf009fbee76bb10c0c4351a1870d2f3 (diff)
downloadlinux-f1bf90724de652efdf493ea877ee050e7e6091c4.tar.xz
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/inode.c')
-rw-r--r--fs/affs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index abcc59899229..fd4ef3c40e40 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -140,6 +140,7 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino)
inode->i_fop = &affs_file_operations;
break;
case ST_SOFTLINK:
+ inode->i_size = strlen((char *)AFFS_HEAD(bh)->table);
inode->i_mode |= S_IFLNK;
inode_nohighmem(inode);
inode->i_op = &affs_symlink_inode_operations;