Commit 8d8926d3 authored by Jan Kara's avatar Jan Kara Committed by Luis Henriques

quota: Properly return errors from dquot_writeback_dquots()

commit 474d2605 upstream.

Due to a switched left and right side of an assignment,
dquot_writeback_dquots() never returned error. This could result in
errors during quota writeback to not be reported to userspace properly.
Fix it.

Coverity-id: 1226884
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 8cad7b8f
...@@ -637,7 +637,7 @@ int dquot_writeback_dquots(struct super_block *sb, int type) ...@@ -637,7 +637,7 @@ int dquot_writeback_dquots(struct super_block *sb, int type)
dqstats_inc(DQST_LOOKUPS); dqstats_inc(DQST_LOOKUPS);
err = sb->dq_op->write_dquot(dquot); err = sb->dq_op->write_dquot(dquot);
if (!ret && err) if (!ret && err)
err = ret; ret = err;
dqput(dquot); dqput(dquot);
spin_lock(&dq_list_lock); spin_lock(&dq_list_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment