summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-11 08:07:37 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-18 19:18:47 +0100
commit05e0bb210209126f495401051996389831f7ba48 (patch)
tree17f1e8829ee1effa6429216cdf0bf14277d2d744 /fs
parent2b07f571617bc6ed2560c26b534c372150197da2 (diff)
downloadlinux-stable-05e0bb210209126f495401051996389831f7ba48.tar.gz
linux-stable-05e0bb210209126f495401051996389831f7ba48.tar.bz2
linux-stable-05e0bb210209126f495401051996389831f7ba48.zip
xfs: fix a missing unlock on error in xfs_fs_map_blocks
[ Upstream commit 2bd3fa793aaa7e98b74e3653fdcc72fa753913b5 ] 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> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_pnfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
index f44c3599527d..1c9bced3e860 100644
--- a/fs/xfs/xfs_pnfs.c
+++ b/fs/xfs/xfs_pnfs.c
@@ -141,7 +141,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);