From: Jan Kara Date: Wed, 22 Oct 2014 07:06:49 +0000 (+0200) Subject: quota: Properly return errors from dquot_writeback_dquots() X-Git-Tag: v3.17.3~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f4f91373870dcbb80bcce2702b9ad84c9740680;p=thirdparty%2Fkernel%2Fstable.git quota: Properly return errors from dquot_writeback_dquots() commit 474d2605d119479e5aa050f738632e63589d4bb5 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index f2d0eee9d1f10..23c548d7ae66d 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -634,7 +634,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); }