diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-01-30 22:39:50 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-01-31 00:57:31 -0500 |
commit | 3256a05531b1164a9c138da701b922a113bddf82 (patch) | |
tree | cbaf7f9c6ee23683eef59922ae08e60da110a487 /fs/nilfs2/segment.c | |
parent | abe94c756c08d50566c09a65b9c7fe72f83071c5 (diff) |
nilfs2: fix potential leak of dirty data on umount
This fixes incorrect usage of nilfs_segctor_confirm() test function in
nilfs_segctor_destroy(); nilfs_segctor_confirm() returns zero if the
filesystem is not clean, so its use in nilfs_segctor_destroy() needs
inversion.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 17584c524486..105b508b47a8 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -2829,7 +2829,7 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci) | |||
2829 | || sci->sc_seq_request != sci->sc_seq_done); | 2829 | || sci->sc_seq_request != sci->sc_seq_done); |
2830 | spin_unlock(&sci->sc_state_lock); | 2830 | spin_unlock(&sci->sc_state_lock); |
2831 | 2831 | ||
2832 | if (flag || nilfs_segctor_confirm(sci)) | 2832 | if (flag || !nilfs_segctor_confirm(sci)) |
2833 | nilfs_segctor_write_out(sci); | 2833 | nilfs_segctor_write_out(sci); |
2834 | 2834 | ||
2835 | WARN_ON(!list_empty(&sci->sc_copied_buffers)); | 2835 | WARN_ON(!list_empty(&sci->sc_copied_buffers)); |