summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-10-22 09:06:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-14 09:00:09 -0800
commit1c6b7ee12064d9bbe84cd7ea85fa8bf8911e0b59 (patch)
treebfa81f5ad1ae96af35824cb0e33c43d340bc4106
parent32835155f64686f15c5d06a853bb33c06b38c0d2 (diff)
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 <jack@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/quota/dquot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index ce87c9007b0f..89da95700c69 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -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);
}