Skip to content

Commit d16a5f8

Browse files
Kemeng Shijankara
authored andcommitted
quota: avoid missing put_quota_format when DQUOT_SUSPENDED is passed
Avoid missing put_quota_format when DQUOT_SUSPENDED is passed to dquot_load_quota_sb. Link: https://patch.msgid.link/[email protected] Signed-off-by: Kemeng Shi <[email protected]> Fixes: d44c576 ("quota: Remove BUG_ON in dquot_load_quota_sb()") Reviewed-by: Joseph Qi <[email protected]> Signed-off-by: Jan Kara <[email protected]>
1 parent 9330697 commit d16a5f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/quota/dquot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2406,7 +2406,7 @@ static int vfs_setup_quota_inode(struct inode *inode, int type)
24062406
int dquot_load_quota_sb(struct super_block *sb, int type, int format_id,
24072407
unsigned int flags)
24082408
{
2409-
struct quota_format_type *fmt = find_quota_format(format_id);
2409+
struct quota_format_type *fmt;
24102410
struct quota_info *dqopt = sb_dqopt(sb);
24112411
int error;
24122412

@@ -2416,6 +2416,7 @@ int dquot_load_quota_sb(struct super_block *sb, int type, int format_id,
24162416
if (WARN_ON_ONCE(flags & DQUOT_SUSPENDED))
24172417
return -EINVAL;
24182418

2419+
fmt = find_quota_format(format_id);
24192420
if (!fmt)
24202421
return -ESRCH;
24212422
if (!sb->dq_op || !sb->s_qcop ||

0 commit comments

Comments
 (0)