diff options
Diffstat (limited to 'fs/nilfs2/the_nilfs.c')
-rw-r--r-- | fs/nilfs2/the_nilfs.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index 69b625586226..661ab762d765 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c | |||
@@ -71,7 +71,6 @@ struct the_nilfs *alloc_nilfs(struct block_device *bdev) | |||
71 | INIT_LIST_HEAD(&nilfs->ns_supers); | 71 | INIT_LIST_HEAD(&nilfs->ns_supers); |
72 | spin_lock_init(&nilfs->ns_last_segment_lock); | 72 | spin_lock_init(&nilfs->ns_last_segment_lock); |
73 | nilfs->ns_gc_inodes_h = NULL; | 73 | nilfs->ns_gc_inodes_h = NULL; |
74 | INIT_LIST_HEAD(&nilfs->ns_used_segments); | ||
75 | init_rwsem(&nilfs->ns_segctor_sem); | 74 | init_rwsem(&nilfs->ns_segctor_sem); |
76 | 75 | ||
77 | return nilfs; | 76 | return nilfs; |
@@ -95,7 +94,6 @@ void put_nilfs(struct the_nilfs *nilfs) | |||
95 | */ | 94 | */ |
96 | might_sleep(); | 95 | might_sleep(); |
97 | if (nilfs_loaded(nilfs)) { | 96 | if (nilfs_loaded(nilfs)) { |
98 | nilfs_dispose_used_segments(nilfs); | ||
99 | nilfs_mdt_clear(nilfs->ns_sufile); | 97 | nilfs_mdt_clear(nilfs->ns_sufile); |
100 | nilfs_mdt_destroy(nilfs->ns_sufile); | 98 | nilfs_mdt_destroy(nilfs->ns_sufile); |
101 | nilfs_mdt_clear(nilfs->ns_cpfile); | 99 | nilfs_mdt_clear(nilfs->ns_cpfile); |
@@ -463,22 +461,6 @@ int nilfs_count_free_blocks(struct the_nilfs *nilfs, sector_t *nblocks) | |||
463 | return err; | 461 | return err; |
464 | } | 462 | } |
465 | 463 | ||
466 | void nilfs_dispose_used_segments(struct the_nilfs *nilfs) | ||
467 | { | ||
468 | struct nilfs_segment_entry *ent, *n; | ||
469 | |||
470 | /* nilfs->sem must be locked by the caller. */ | ||
471 | if (!nilfs_loaded(nilfs)) | ||
472 | return; | ||
473 | |||
474 | list_for_each_entry_safe(ent, n, &nilfs->ns_used_segments, list) { | ||
475 | list_del_init(&ent->list); | ||
476 | nilfs_segment_usage_clear_volatile_active(ent->raw_su); | ||
477 | nilfs_close_segment_entry(ent, nilfs->ns_sufile); | ||
478 | nilfs_free_segment_entry(ent); | ||
479 | } | ||
480 | } | ||
481 | |||
482 | int nilfs_near_disk_full(struct the_nilfs *nilfs) | 464 | int nilfs_near_disk_full(struct the_nilfs *nilfs) |
483 | { | 465 | { |
484 | struct inode *sufile = nilfs->ns_sufile; | 466 | struct inode *sufile = nilfs->ns_sufile; |