aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r--fs/nilfs2/segment.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 2de9f636792..851bcd3890c 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2298,6 +2298,7 @@ int nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode,
2298 loff_t start, loff_t end) 2298 loff_t start, loff_t end)
2299{ 2299{
2300 struct nilfs_sb_info *sbi = NILFS_SB(sb); 2300 struct nilfs_sb_info *sbi = NILFS_SB(sb);
2301 struct the_nilfs *nilfs = sbi->s_nilfs;
2301 struct nilfs_sc_info *sci = NILFS_SC(sbi); 2302 struct nilfs_sc_info *sci = NILFS_SC(sbi);
2302 struct nilfs_inode_info *ii; 2303 struct nilfs_inode_info *ii;
2303 struct nilfs_transaction_info ti; 2304 struct nilfs_transaction_info ti;
@@ -2310,9 +2311,9 @@ int nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode,
2310 2311
2311 ii = NILFS_I(inode); 2312 ii = NILFS_I(inode);
2312 if (test_bit(NILFS_I_INODE_DIRTY, &ii->i_state) || 2313 if (test_bit(NILFS_I_INODE_DIRTY, &ii->i_state) ||
2313 nilfs_test_opt(sbi, STRICT_ORDER) || 2314 nilfs_test_opt(nilfs, STRICT_ORDER) ||
2314 test_bit(NILFS_SC_UNCLOSED, &sci->sc_flags) || 2315 test_bit(NILFS_SC_UNCLOSED, &sci->sc_flags) ||
2315 nilfs_discontinued(sbi->s_nilfs)) { 2316 nilfs_discontinued(nilfs)) {
2316 nilfs_transaction_unlock(sbi); 2317 nilfs_transaction_unlock(sbi);
2317 err = nilfs_segctor_sync(sci); 2318 err = nilfs_segctor_sync(sci);
2318 return err; 2319 return err;
@@ -2480,14 +2481,14 @@ int nilfs_clean_segments(struct super_block *sb, struct nilfs_argv *argv,
2480 set_current_state(TASK_INTERRUPTIBLE); 2481 set_current_state(TASK_INTERRUPTIBLE);
2481 schedule_timeout(sci->sc_interval); 2482 schedule_timeout(sci->sc_interval);
2482 } 2483 }
2483 if (nilfs_test_opt(sbi, DISCARD)) { 2484 if (nilfs_test_opt(nilfs, DISCARD)) {
2484 int ret = nilfs_discard_segments(nilfs, sci->sc_freesegs, 2485 int ret = nilfs_discard_segments(nilfs, sci->sc_freesegs,
2485 sci->sc_nfreesegs); 2486 sci->sc_nfreesegs);
2486 if (ret) { 2487 if (ret) {
2487 printk(KERN_WARNING 2488 printk(KERN_WARNING
2488 "NILFS warning: error %d on discard request, " 2489 "NILFS warning: error %d on discard request, "
2489 "turning discards off for the device\n", ret); 2490 "turning discards off for the device\n", ret);
2490 nilfs_clear_opt(sbi, DISCARD); 2491 nilfs_clear_opt(nilfs, DISCARD);
2491 } 2492 }
2492 } 2493 }
2493 2494