mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-19 16:14:13 +08:00
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>
This commit is contained in:
parent
abe94c756c
commit
3256a05531
@ -2829,7 +2829,7 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
|
||||
|| sci->sc_seq_request != sci->sc_seq_done);
|
||||
spin_unlock(&sci->sc_state_lock);
|
||||
|
||||
if (flag || nilfs_segctor_confirm(sci))
|
||||
if (flag || !nilfs_segctor_confirm(sci))
|
||||
nilfs_segctor_write_out(sci);
|
||||
|
||||
WARN_ON(!list_empty(&sci->sc_copied_buffers));
|
||||
|
Loading…
Reference in New Issue
Block a user