diff options
| author | Colin Ian King <colin.king@canonical.com> | 2021-03-04 12:21:18 +0300 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-03-13 00:16:44 +0300 |
| commit | 28e18ee636ba28532dbe425540af06245a0bbecb (patch) | |
| tree | 7aa5e0577b573c243bacfaa529be42e57736235a /lib/mpi/mpi-sub-ui.c | |
| parent | 1153db095fd6c5cc59425171ddef4a4c83464643 (diff) | |
| download | linux-28e18ee636ba28532dbe425540af06245a0bbecb.tar.xz | |
f2fs: fix a redundant call to f2fs_balance_fs if an error occurs
The uninitialized variable dn.node_changed does not get set when a
call to f2fs_get_node_page fails. This uninitialized value gets used
in the call to f2fs_balance_fs() that may or not may not balances
dirty node and dentry pages depending on the uninitialized state of
the variable. Fix this by only calling f2fs_balance_fs if err is
not set.
Thanks to Jaegeuk Kim for suggesting an appropriate fix.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 2a3407607028 ("f2fs: call f2fs_balance_fs only when node was changed")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions
