diff options
Diffstat (limited to 'fs/bfs/inode.c')
-rw-r--r-- | fs/bfs/inode.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index cf74f3d4d966..ed27ffb3459e 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
@@ -76,7 +76,6 @@ static void bfs_read_inode(struct inode * inode) | |||
76 | inode->i_size = BFS_FILESIZE(di); | 76 | inode->i_size = BFS_FILESIZE(di); |
77 | inode->i_blocks = BFS_FILEBLOCKS(di); | 77 | inode->i_blocks = BFS_FILEBLOCKS(di); |
78 | if (inode->i_size || inode->i_blocks) dprintf("Registered inode with %lld size, %ld blocks\n", inode->i_size, inode->i_blocks); | 78 | if (inode->i_size || inode->i_blocks) dprintf("Registered inode with %lld size, %ld blocks\n", inode->i_size, inode->i_blocks); |
79 | inode->i_blksize = PAGE_SIZE; | ||
80 | inode->i_atime.tv_sec = le32_to_cpu(di->i_atime); | 79 | inode->i_atime.tv_sec = le32_to_cpu(di->i_atime); |
81 | inode->i_mtime.tv_sec = le32_to_cpu(di->i_mtime); | 80 | inode->i_mtime.tv_sec = le32_to_cpu(di->i_mtime); |
82 | inode->i_ctime.tv_sec = le32_to_cpu(di->i_ctime); | 81 | inode->i_ctime.tv_sec = le32_to_cpu(di->i_ctime); |
@@ -268,8 +267,7 @@ static int init_inodecache(void) | |||
268 | 267 | ||
269 | static void destroy_inodecache(void) | 268 | static void destroy_inodecache(void) |
270 | { | 269 | { |
271 | if (kmem_cache_destroy(bfs_inode_cachep)) | 270 | kmem_cache_destroy(bfs_inode_cachep); |
272 | printk(KERN_INFO "bfs_inode_cache: not all structures were freed\n"); | ||
273 | } | 271 | } |
274 | 272 | ||
275 | static struct super_operations bfs_sops = { | 273 | static struct super_operations bfs_sops = { |
@@ -311,11 +309,10 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) | |||
311 | unsigned i, imap_len; | 309 | unsigned i, imap_len; |
312 | struct bfs_sb_info * info; | 310 | struct bfs_sb_info * info; |
313 | 311 | ||
314 | info = kmalloc(sizeof(*info), GFP_KERNEL); | 312 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
315 | if (!info) | 313 | if (!info) |
316 | return -ENOMEM; | 314 | return -ENOMEM; |
317 | s->s_fs_info = info; | 315 | s->s_fs_info = info; |
318 | memset(info, 0, sizeof(*info)); | ||
319 | 316 | ||
320 | sb_set_blocksize(s, BFS_BSIZE); | 317 | sb_set_blocksize(s, BFS_BSIZE); |
321 | 318 | ||
@@ -338,10 +335,9 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) | |||
338 | + BFS_ROOT_INO - 1; | 335 | + BFS_ROOT_INO - 1; |
339 | 336 | ||
340 | imap_len = info->si_lasti/8 + 1; | 337 | imap_len = info->si_lasti/8 + 1; |
341 | info->si_imap = kmalloc(imap_len, GFP_KERNEL); | 338 | info->si_imap = kzalloc(imap_len, GFP_KERNEL); |
342 | if (!info->si_imap) | 339 | if (!info->si_imap) |
343 | goto out; | 340 | goto out; |
344 | memset(info->si_imap, 0, imap_len); | ||
345 | for (i=0; i<BFS_ROOT_INO; i++) | 341 | for (i=0; i<BFS_ROOT_INO; i++) |
346 | set_bit(i, info->si_imap); | 342 | set_bit(i, info->si_imap); |
347 | 343 | ||