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/recovery.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/recovery.c')
-rw-r--r-- | fs/nilfs2/recovery.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c index dcb5a9812c6c..5d2711c28da7 100644 --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c | |||
@@ -440,7 +440,6 @@ static int nilfs_prepare_segment_for_recovery(struct the_nilfs *nilfs, | |||
440 | segnum[2] = ri->ri_segnum; | 440 | segnum[2] = ri->ri_segnum; |
441 | segnum[3] = ri->ri_nextnum; | 441 | segnum[3] = ri->ri_nextnum; |
442 | 442 | ||
443 | nilfs_attach_writer(nilfs, sbi); | ||
444 | /* | 443 | /* |
445 | * Releasing the next segment of the latest super root. | 444 | * Releasing the next segment of the latest super root. |
446 | * The next segment is invalidated by this recovery. | 445 | * The next segment is invalidated by this recovery. |
@@ -480,7 +479,6 @@ static int nilfs_prepare_segment_for_recovery(struct the_nilfs *nilfs, | |||
480 | 479 | ||
481 | failed: | 480 | failed: |
482 | /* No need to recover sufile because it will be destroyed on error */ | 481 | /* No need to recover sufile because it will be destroyed on error */ |
483 | nilfs_detach_writer(nilfs, sbi); | ||
484 | return err; | 482 | return err; |
485 | } | 483 | } |
486 | 484 | ||
@@ -599,7 +597,6 @@ static int nilfs_do_roll_forward(struct the_nilfs *nilfs, | |||
599 | }; | 597 | }; |
600 | int state = RF_INIT_ST; | 598 | int state = RF_INIT_ST; |
601 | 599 | ||
602 | nilfs_attach_writer(nilfs, sbi); | ||
603 | pseg_start = ri->ri_lsegs_start; | 600 | pseg_start = ri->ri_lsegs_start; |
604 | seg_seq = ri->ri_lsegs_start_seq; | 601 | seg_seq = ri->ri_lsegs_start_seq; |
605 | segnum = nilfs_get_segnum_of_block(nilfs, pseg_start); | 602 | segnum = nilfs_get_segnum_of_block(nilfs, pseg_start); |
@@ -690,7 +687,6 @@ static int nilfs_do_roll_forward(struct the_nilfs *nilfs, | |||
690 | out: | 687 | out: |
691 | brelse(bh_sum); | 688 | brelse(bh_sum); |
692 | dispose_recovery_list(&dsync_blocks); | 689 | dispose_recovery_list(&dsync_blocks); |
693 | nilfs_detach_writer(nilfs, sbi); | ||
694 | return err; | 690 | return err; |
695 | 691 | ||
696 | confused: | 692 | confused: |