summaryrefslogtreecommitdiffstats
path: root/fs/quota
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-10-22 09:06:49 +0200
committerJan Kara <jack@suse.cz>2014-10-22 09:08:03 +0200
commit474d2605d119479e5aa050f738632e63589d4bb5 (patch)
treeaa16eb470b59d74bbc112eb02876c82abffdce34 /fs/quota
parent7938db449bbc55bbeb164bec7af406212e7e98f1 (diff)
downloadlinux-474d2605d119479e5aa050f738632e63589d4bb5.tar.gz
linux-474d2605d119479e5aa050f738632e63589d4bb5.tar.bz2
linux-474d2605d119479e5aa050f738632e63589d4bb5.zip
quota: Properly return errors from dquot_writeback_dquots()
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. CC: stable@vger.kernel.org Coverity-id: 1226884 Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota')
-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 8b663b2d9562..6b4527216a7f 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);
}