summaryrefslogtreecommitdiff
path: root/fs
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 10:10:37 -0800
commit1f4f91373870dcbb80bcce2702b9ad84c9740680 (patch)
tree0d182fb122bbb2574a7fa1c04479abe7889cb508 /fs
parentbfa72302e63fc374c706495b53a5b2e69db043a8 (diff)
downloadlwn-1f4f91373870dcbb80bcce2702b9ad84c9740680.tar.gz
lwn-1f4f91373870dcbb80bcce2702b9ad84c9740680.zip
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>
Diffstat (limited to 'fs')
-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 f2d0eee9d1f1..23c548d7ae66 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);
}