summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-12-18 13:20:50 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2008-12-18 13:20:50 +1100
commit2840c6f7fdf765019006d28b1ceaa0c24512b9c1 (patch)
tree9bc130a7dc38475cf0511ff35b99a6ca49a947ee /fs
parent5a895a973ee9b16404a4fb99bf50ef1124145453 (diff)
parentd69e83d99cf87e3328c47bb54684360e32aef17d (diff)
Merge commit 'jfs/next'
Diffstat (limited to 'fs')
-rw-r--r--fs/jfs/inode.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index 210339784b56..b00ee9f05a06 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -59,8 +59,14 @@ struct inode *jfs_iget(struct super_block *sb, unsigned long ino)
if (inode->i_size >= IDATASIZE) {
inode->i_op = &page_symlink_inode_operations;
inode->i_mapping->a_ops = &jfs_aops;
- } else
+ } else {
inode->i_op = &jfs_symlink_inode_operations;
+ /*
+ * The inline data should be null-terminated, but
+ * don't let on-disk corruption crash the kernel
+ */
+ JFS_IP(inode)->i_inline[inode->i_size] = '\0';
+ }
} else {
inode->i_op = &jfs_file_inode_operations;
init_special_inode(inode, inode->i_mode, inode->i_rdev);