mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
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>
This commit is contained in:
parent
f8107c996f
commit
c87d175d0a
1 changed files with 1 additions and 3 deletions
|
@ -2819,7 +2819,6 @@ EXPORT_SYMBOL(dquot_get_state);
|
||||||
int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii)
|
int dquot_set_dqinfo(struct super_block *sb, int type, struct qc_info *ii)
|
||||||
{
|
{
|
||||||
struct mem_dqinfo *mi;
|
struct mem_dqinfo *mi;
|
||||||
int err = 0;
|
|
||||||
|
|
||||||
if ((ii->i_fieldmask & QC_WARNS_MASK) ||
|
if ((ii->i_fieldmask & QC_WARNS_MASK) ||
|
||||||
(ii->i_fieldmask & QC_RT_SPC_TIMER))
|
(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)
|
||||||
spin_unlock(&dq_data_lock);
|
spin_unlock(&dq_data_lock);
|
||||||
mark_info_dirty(sb, type);
|
mark_info_dirty(sb, type);
|
||||||
/* Force write to disk */
|
/* Force write to disk */
|
||||||
sb->dq_op->write_info(sb, type);
|
return sb->dq_op->write_info(sb, type);
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dquot_set_dqinfo);
|
EXPORT_SYMBOL(dquot_set_dqinfo);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue