Skip to content

Commit c87d175

Browse files
bbkzzjankara
authored andcommitted
quota: make dquot_set_dqinfo return errors from ->write_info
dquot_set_dqinfo() ignores the return code from the ->write_info call, which means that quotacalls like Q_SETINFO never see the error. This doesn't seem right, so fix that. Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20230227120216.31306-2-frank.li@vivo.com>
1 parent f8107c9 commit c87d175

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

fs/quota/dquot.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,7 +2819,6 @@ EXPORT_SYMBOL(dquot_get_state);
28192819
int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii)
28202820
{
28212821
struct mem_dqinfo *mi;
2822-
int err = 0;
28232822

28242823
if ((ii->i_fieldmask & QC_WARNS_MASK) ||
28252824
(ii->i_fieldmask & QC_RT_SPC_TIMER))
@@ -2846,8 +2845,7 @@ int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii)
28462845
spin_unlock(&dq_data_lock);
28472846
mark_info_dirty(sb, type);
28482847
/* Force write to disk */
2849-
sb->dq_op->write_info(sb, type);
2850-
return err;
2848+
return sb->dq_op->write_info(sb, type);
28512849
}
28522850
EXPORT_SYMBOL(dquot_set_dqinfo);
28532851

0 commit comments

Comments
 (0)