From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix a missing unlock on error in xfs_fs_map_blocks
Date: Wed, 11 Nov 2020 08:07:09 -0800 [thread overview]
Message-ID: <20201111160709.GQ9695@magnolia> (raw)
In-Reply-To: <20201111094326.3513946-1-hch@lst.de>
On Wed, Nov 11, 2020 at 10:43:26AM +0100, Christoph Hellwig wrote:
> We also need to drop the iolock when invalidate_inode_pages2 fails, not
> only on all other error or successful cases.
>
> Fixes: 527851124d10 ("xfs: implement pNFS export operations")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks good to me,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/xfs_pnfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
> index b101feb2aab452..f3082a957d5e1a 100644
> --- a/fs/xfs/xfs_pnfs.c
> +++ b/fs/xfs/xfs_pnfs.c
> @@ -134,7 +134,7 @@ xfs_fs_map_blocks(
> goto out_unlock;
> error = invalidate_inode_pages2(inode->i_mapping);
> if (WARN_ON_ONCE(error))
> - return error;
> + goto out_unlock;
>
> end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + length);
> offset_fsb = XFS_B_TO_FSBT(mp, offset);
> --
> 2.28.0
>
prev parent reply other threads:[~2020-11-11 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 9:43 [PATCH] xfs: fix a missing unlock on error in xfs_fs_map_blocks Christoph Hellwig
2020-11-11 16:07 ` 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=20201111160709.GQ9695@magnolia \
--to=darrick.wong@oracle.com \
--cc=hch@lst.de \
--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