diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2008-12-31 19:56:05 +0100 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-12-31 19:56:05 +0100 |
commit | 418f19ea17a99421b22a64e101e14b6a16bed66d (patch) | |
tree | 7c21fcc368c63f1f9907deac6d16b30bd371792d /fs/jfs/inode.c | |
parent | 98444d3dd975653a4a970ecc0dfc30918da92f60 (diff) | |
parent | f6e10b865c3ea56bdaa8c6ecfee313b997900dbb (diff) |
Merge branch 'master' of ../mmc
Diffstat (limited to 'fs/jfs/inode.c')
-rw-r--r-- | fs/jfs/inode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 210339784b5..b00ee9f05a0 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); |