lkml.org 
[lkml]   [2014]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 182/206] quota: Properly return errors from dquot_writeback_dquots()
    Date
    From: Jan Kara <jack@suse.cz>

    3.12-stable review patch. If anyone has any objections, please let me know.

    ===============

    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: Jiri Slaby <jslaby@suse.cz>
    ---
    fs/quota/dquot.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
    index 7f30bdc57d13..f56a35758112 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);
    }
    --
    2.1.3


    \
     
     \ /
      Last update: 2014-11-18 16:01    [W:4.545 / U:0.740 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site