quota: avoid missing put_quota_format when DQUOT_SUSPENDED is passed
BugLink: https://bugs.launchpad.net/bugs/2089340 [ Upstream commit d16a5f852025be546b6e4ceef15899db3490f4d7 ] Avoid missing put_quota_format when DQUOT_SUSPENDED is passed to dquot_load_quota_sb. Link: https://patch.msgid.link/20240715130534.2112678-2-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Fixes: d44c57663723 ("quota: Remove BUG_ON in dquot_load_quota_sb()") Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
f1238ea925
commit
8d961f3160
+2
-1
@@ -2407,7 +2407,7 @@ static int vfs_setup_quota_inode(struct inode *inode, int type)
|
||||
int dquot_load_quota_sb(struct super_block *sb, int type, int format_id,
|
||||
unsigned int flags)
|
||||
{
|
||||
struct quota_format_type *fmt = find_quota_format(format_id);
|
||||
struct quota_format_type *fmt;
|
||||
struct quota_info *dqopt = sb_dqopt(sb);
|
||||
int error;
|
||||
|
||||
@@ -2416,6 +2416,7 @@ int dquot_load_quota_sb(struct super_block *sb, int type, int format_id,
|
||||
/* Just unsuspend quotas? */
|
||||
BUG_ON(flags & DQUOT_SUSPENDED);
|
||||
|
||||
fmt = find_quota_format(format_id);
|
||||
if (!fmt)
|
||||
return -ESRCH;
|
||||
if (!sb->dq_op || !sb->s_qcop ||
|
||||
|
||||
Reference in New Issue
Block a user