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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 105b508b47a8..9280b0f10792 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2560,6 +2560,16 @@ int nilfs_clean_segments(struct super_block *sb, struct nilfs_argv *argv,
2560 set_current_state(TASK_INTERRUPTIBLE); 2560 set_current_state(TASK_INTERRUPTIBLE);
2561 schedule_timeout(sci->sc_interval); 2561 schedule_timeout(sci->sc_interval);
2562 } 2562 }
2563 if (nilfs_test_opt(sbi, DISCARD)) {
2564 int ret = nilfs_discard_segments(nilfs, sci->sc_freesegs,
2565 sci->sc_nfreesegs);
2566 if (ret) {
2567 printk(KERN_WARNING
2568 "NILFS warning: error %d on discard request, "
2569 "turning discards off for the device\n", ret);
2570 nilfs_clear_opt(sbi, DISCARD);
2571 }
2572 }
2563 2573
2564 out_unlock: 2574 out_unlock:
2565 sci->sc_freesegs = NULL; 2575 sci->sc_freesegs = NULL;