diff options
Diffstat (limited to 'fs/cramfs/inode.c')
-rw-r--r-- | fs/cramfs/inode.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 223c0431042d..a624c3ec8189 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c | |||
@@ -73,7 +73,6 @@ static int cramfs_iget5_set(struct inode *inode, void *opaque) | |||
73 | inode->i_uid = cramfs_inode->uid; | 73 | inode->i_uid = cramfs_inode->uid; |
74 | inode->i_size = cramfs_inode->size; | 74 | inode->i_size = cramfs_inode->size; |
75 | inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1; | 75 | inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1; |
76 | inode->i_blksize = PAGE_CACHE_SIZE; | ||
77 | inode->i_gid = cramfs_inode->gid; | 76 | inode->i_gid = cramfs_inode->gid; |
78 | /* Struct copy intentional */ | 77 | /* Struct copy intentional */ |
79 | inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime; | 78 | inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime; |
@@ -242,11 +241,10 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent) | |||
242 | 241 | ||
243 | sb->s_flags |= MS_RDONLY; | 242 | sb->s_flags |= MS_RDONLY; |
244 | 243 | ||
245 | sbi = kmalloc(sizeof(struct cramfs_sb_info), GFP_KERNEL); | 244 | sbi = kzalloc(sizeof(struct cramfs_sb_info), GFP_KERNEL); |
246 | if (!sbi) | 245 | if (!sbi) |
247 | return -ENOMEM; | 246 | return -ENOMEM; |
248 | sb->s_fs_info = sbi; | 247 | sb->s_fs_info = sbi; |
249 | memset(sbi, 0, sizeof(struct cramfs_sb_info)); | ||
250 | 248 | ||
251 | /* Invalidate the read buffers on mount: think disk change.. */ | 249 | /* Invalidate the read buffers on mount: think disk change.. */ |
252 | mutex_lock(&read_mutex); | 250 | mutex_lock(&read_mutex); |
@@ -545,8 +543,15 @@ static struct file_system_type cramfs_fs_type = { | |||
545 | 543 | ||
546 | static int __init init_cramfs_fs(void) | 544 | static int __init init_cramfs_fs(void) |
547 | { | 545 | { |
548 | cramfs_uncompress_init(); | 546 | int rv; |
549 | return register_filesystem(&cramfs_fs_type); | 547 | |
548 | rv = cramfs_uncompress_init(); | ||
549 | if (rv < 0) | ||
550 | return rv; | ||
551 | rv = register_filesystem(&cramfs_fs_type); | ||
552 | if (rv < 0) | ||
553 | cramfs_uncompress_exit(); | ||
554 | return rv; | ||
550 | } | 555 | } |
551 | 556 | ||
552 | static void __exit exit_cramfs_fs(void) | 557 | static void __exit exit_cramfs_fs(void) |