quota: Properly return errors from dquot_writeback_dquots()

commit 474d2605d1 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: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jan Kara 2014-10-22 09:06:49 +02:00 committed by Greg Kroah-Hartman
parent b57203e1fd
commit 33d90ee4d0

View File

@ -637,7 +637,7 @@ int dquot_writeback_dquots(struct super_block *sb, int type)
dqstats_inc(DQST_LOOKUPS);
err = sb->dq_op->write_dquot(dquot);
if (!ret && err)
err = ret;
ret = err;
dqput(dquot);
spin_lock(&dq_list_lock);
}