diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-09-05 03:17:35 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-22 20:24:38 -0400 |
commit | 090fd5b10165033d7c30afde0a7e59141d820602 (patch) | |
tree | cbb3ec5b29719457cd45f72624d03d7e31af4a4c /fs/nilfs2/segment.c | |
parent | c6e071884aca360a14c21757d760e76ec34b4894 (diff) |
nilfs2: get rid of back pointer to writable sb instance
Nilfs object holds a back pointer to a writable super block instance
in nilfs->ns_writer, and this became eliminable since sb is now made
per device and all inodes have a valid pointer to it.
This deletes the ns_writer pointer and a reader/writer semaphore
protecting it.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r-- | fs/nilfs2/segment.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index b0c5e08d06c8..56350bf1f79f 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -2799,7 +2799,6 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci) | |||
2799 | int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi, | 2799 | int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi, |
2800 | struct nilfs_root *root) | 2800 | struct nilfs_root *root) |
2801 | { | 2801 | { |
2802 | struct the_nilfs *nilfs = sbi->s_nilfs; | ||
2803 | int err; | 2802 | int err; |
2804 | 2803 | ||
2805 | if (NILFS_SC(sbi)) { | 2804 | if (NILFS_SC(sbi)) { |
@@ -2815,10 +2814,8 @@ int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi, | |||
2815 | if (!sbi->s_sc_info) | 2814 | if (!sbi->s_sc_info) |
2816 | return -ENOMEM; | 2815 | return -ENOMEM; |
2817 | 2816 | ||
2818 | nilfs_attach_writer(nilfs, sbi); | ||
2819 | err = nilfs_segctor_start_thread(NILFS_SC(sbi)); | 2817 | err = nilfs_segctor_start_thread(NILFS_SC(sbi)); |
2820 | if (err) { | 2818 | if (err) { |
2821 | nilfs_detach_writer(nilfs, sbi); | ||
2822 | kfree(sbi->s_sc_info); | 2819 | kfree(sbi->s_sc_info); |
2823 | sbi->s_sc_info = NULL; | 2820 | sbi->s_sc_info = NULL; |
2824 | } | 2821 | } |
@@ -2855,5 +2852,4 @@ void nilfs_detach_segment_constructor(struct nilfs_sb_info *sbi) | |||
2855 | up_write(&nilfs->ns_segctor_sem); | 2852 | up_write(&nilfs->ns_segctor_sem); |
2856 | 2853 | ||
2857 | nilfs_dispose_list(sbi, &garbage_list, 1); | 2854 | nilfs_dispose_list(sbi, &garbage_list, 1); |
2858 | nilfs_detach_writer(nilfs, sbi); | ||
2859 | } | 2855 | } |