linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: don't iunlock the quota ip when quota block allocation fails
Date: Thu, 22 Feb 2018 15:51:01 -0800	[thread overview]
Message-ID: <20180222235101.GK9827@magnolia> (raw)
In-Reply-To: <20180222230435.GJ9827@magnolia>

On Thu, Feb 22, 2018 at 03:04:35PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> In xfs_qm_dqalloc, we join the locked quota inode to the transaction we
> use to allocate blocks.  If the allocation or mapping fails, we're not
> allowed to unlock the inode because the transaction code is in charge of
> unlocking it for us.  Therefore, remove the iunlock call to avoid
> blowing asserts about unbalanced locking + mount hang.
> 
> Found by corrupting the AGF and allocating space in the filesystem
> (quotacheck) immediately after mount.  The upcoming agfl wrapping fixup
> test will trigger this scenario.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Realized I had a whole pile of other fixes to send out, so ignore this
for now.

--D

> ---
>  fs/xfs/xfs_dquot.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
> index 43572f8..2410acc 100644
> --- a/fs/xfs/xfs_dquot.c
> +++ b/fs/xfs/xfs_dquot.c
> @@ -394,8 +394,6 @@ xfs_qm_dqalloc(
>  error1:
>  	xfs_defer_cancel(&dfops);
>  error0:
> -	xfs_iunlock(quotip, XFS_ILOCK_EXCL);
> -
>  	return error;
>  }
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2018-02-22 23:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 23:04 [PATCH] xfs: don't iunlock the quota ip when quota block allocation fails Darrick J. Wong
2018-02-22 23:51 ` Darrick J. Wong [this message]

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=20180222235101.GK9827@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).