Commit d32840ad authored by Joseph Qi's avatar Joseph Qi Committed by Andrew Morton

ocfs2: correct return value of ocfs2_local_free_info()

Now in ocfs2_local_free_info(), it returns 0 even if it actually fails. 
Though it doesn't cause any real problem since the only caller
dquot_disable() ignores the return value, we'd better return correct as it
is.

Link: https://lkml.kernel.org/r/20230528132033.217664-1-joseph.qi@linux.alibaba.comSigned-off-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 4df3504e
...@@ -811,7 +811,7 @@ static int ocfs2_local_free_info(struct super_block *sb, int type) ...@@ -811,7 +811,7 @@ static int ocfs2_local_free_info(struct super_block *sb, int type)
struct ocfs2_quota_chunk *chunk; struct ocfs2_quota_chunk *chunk;
struct ocfs2_local_disk_chunk *dchunk; struct ocfs2_local_disk_chunk *dchunk;
int mark_clean = 1, len; int mark_clean = 1, len;
int status; int status = 0;
iput(oinfo->dqi_gqinode); iput(oinfo->dqi_gqinode);
ocfs2_simple_drop_lockres(OCFS2_SB(sb), &oinfo->dqi_gqlock); ocfs2_simple_drop_lockres(OCFS2_SB(sb), &oinfo->dqi_gqlock);
...@@ -853,17 +853,14 @@ static int ocfs2_local_free_info(struct super_block *sb, int type) ...@@ -853,17 +853,14 @@ static int ocfs2_local_free_info(struct super_block *sb, int type)
oinfo->dqi_libh, oinfo->dqi_libh,
olq_update_info, olq_update_info,
info); info);
if (status < 0) { if (status < 0)
mlog_errno(status); mlog_errno(status);
goto out;
}
out: out:
ocfs2_inode_unlock(sb_dqopt(sb)->files[type], 1); ocfs2_inode_unlock(sb_dqopt(sb)->files[type], 1);
brelse(oinfo->dqi_libh); brelse(oinfo->dqi_libh);
brelse(oinfo->dqi_lqi_bh); brelse(oinfo->dqi_lqi_bh);
kfree(oinfo); kfree(oinfo);
return 0; return status;
} }
static void olq_set_dquot(struct buffer_head *bh, void *private) static void olq_set_dquot(struct buffer_head *bh, void *private)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment