linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>, jack@suse.com
Cc: mark@fasheh.com, jlbec@evilplan.org, hughd@google.com,
	akpm@linux-foundation.org, ocfs2-devel@lists.linux.dev,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/4] quota: avoid missing put_quota_format when DQUOT_SUSPENDED is passed
Date: Tue, 16 Jul 2024 09:10:18 +0800	[thread overview]
Message-ID: <afca4e22-7edd-494f-9a43-66d1098a3ec4@linux.alibaba.com> (raw)
In-Reply-To: <20240715130534.2112678-2-shikemeng@huaweicloud.com>



On 7/15/24 9:05 PM, Kemeng Shi wrote:
> Avoid missing put_quota_format when DQUOT_SUSPENDED is passed to
> dquot_load_quota_sb.
> 

It seems worth a 'Fixes' tag:
Fixes: d44c57663723 ("quota: Remove BUG_ON in dquot_load_quota_sb()")

Other looks good to me. So with the above addressed, feel free to add:
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>

> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> ---
>  fs/quota/dquot.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
> index 627eb2f72ef3..23fcf9e9d6c5 100644
> --- a/fs/quota/dquot.c
> +++ b/fs/quota/dquot.c
> @@ -2408,7 +2408,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;
>  
> @@ -2418,6 +2418,7 @@ int dquot_load_quota_sb(struct super_block *sb, int type, int format_id,
>  	if (WARN_ON_ONCE(flags & DQUOT_SUSPENDED))
>  		return -EINVAL;
>  
> +	fmt = find_quota_format(format_id);
>  	if (!fmt)
>  		return -ESRCH;
>  	if (!sb->dq_op || !sb->s_qcop ||


  reply	other threads:[~2024-07-16  1:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15 13:05 [PATCH 0/4] Fix and cleanups to quota Kemeng Shi
2024-07-15 13:05 ` [PATCH 1/4] quota: avoid missing put_quota_format when DQUOT_SUSPENDED is passed Kemeng Shi
2024-07-16  1:10   ` Joseph Qi [this message]
2024-07-17 13:09     ` Jan Kara
2024-07-15 13:05 ` [PATCH 2/4] quota: remove unneeded return value of register_quota_format Kemeng Shi
2024-07-16  1:19   ` Joseph Qi
2024-07-15 13:05 ` [PATCH 3/4] quota: remove redundant return at end of void function Kemeng Shi
2024-07-15 13:05 ` [PATCH 4/4] quota: remove unnecessary error code translation in dquot_quota_enable Kemeng Shi
2024-07-17 13:12 ` [PATCH 0/4] Fix and cleanups to quota Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afca4e22-7edd-494f-9a43-66d1098a3ec4@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=jack@suse.com \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    --cc=shikemeng@huaweicloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox