diff options
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r-- | fs/nilfs2/super.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 9926a1d6d225..70e8613a1954 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -367,17 +367,12 @@ static void nilfs_write_super(struct super_block *sb) | |||
367 | 367 | ||
368 | down_write(&nilfs->ns_sem); | 368 | down_write(&nilfs->ns_sem); |
369 | if (!(sb->s_flags & MS_RDONLY)) { | 369 | if (!(sb->s_flags & MS_RDONLY)) { |
370 | struct nilfs_super_block **sbp = nilfs->ns_sbp; | 370 | if (!nilfs_discontinued(nilfs) && |
371 | u64 t = get_seconds(); | 371 | !nilfs_sb_need_update(nilfs)) { |
372 | int dupsb; | ||
373 | |||
374 | if (!nilfs_discontinued(nilfs) && t >= nilfs->ns_sbwtime[0] && | ||
375 | t < nilfs->ns_sbwtime[0] + NILFS_SB_FREQ) { | ||
376 | up_write(&nilfs->ns_sem); | 372 | up_write(&nilfs->ns_sem); |
377 | return; | 373 | return; |
378 | } | 374 | } |
379 | dupsb = sbp[1] && t > nilfs->ns_sbwtime[1] + NILFS_ALTSB_FREQ; | 375 | nilfs_commit_super(sbi, nilfs_altsb_need_update(nilfs)); |
380 | nilfs_commit_super(sbi, dupsb); | ||
381 | } | 376 | } |
382 | sb->s_dirt = 0; | 377 | sb->s_dirt = 0; |
383 | up_write(&nilfs->ns_sem); | 378 | up_write(&nilfs->ns_sem); |