diff options
Diffstat (limited to 'fs/bfs')
-rw-r--r-- | fs/bfs/dir.c | 2 | ||||
-rw-r--r-- | fs/bfs/inode.c | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 26fad9621738..dcf04cb13283 100644 --- a/fs/bfs/dir.c +++ b/fs/bfs/dir.c | |||
@@ -102,7 +102,7 @@ static int bfs_create(struct inode * dir, struct dentry * dentry, int mode, | |||
102 | inode->i_uid = current->fsuid; | 102 | inode->i_uid = current->fsuid; |
103 | inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; | 103 | inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; |
104 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; | 104 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; |
105 | inode->i_blocks = inode->i_blksize = 0; | 105 | inode->i_blocks = 0; |
106 | inode->i_op = &bfs_file_inops; | 106 | inode->i_op = &bfs_file_inops; |
107 | inode->i_fop = &bfs_file_operations; | 107 | inode->i_fop = &bfs_file_operations; |
108 | inode->i_mapping->a_ops = &bfs_aops; | 108 | inode->i_mapping->a_ops = &bfs_aops; |
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 | ||