From ced2a7172f85f1c1fee1827643bc997af0dc824f Mon Sep 17 00:00:00 2001 From: Anthony Iliopoulos Date: Nov 16 2020 11:40:35 +0000 Subject: xfs: fix a missing unlock on error in xfs_fs_map_blocks (git-fixes). --- diff --git a/patches.suse/xfs-fix-a-missing-unlock-on-error-in-xfs_fs_map_bloc.patch b/patches.suse/xfs-fix-a-missing-unlock-on-error-in-xfs_fs_map_bloc.patch new file mode 100644 index 0000000..719b954 --- /dev/null +++ b/patches.suse/xfs-fix-a-missing-unlock-on-error-in-xfs_fs_map_bloc.patch @@ -0,0 +1,37 @@ +From 2bd3fa793aaa7e98b74e3653fdcc72fa753913b5 Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig +Date: Wed, 11 Nov 2020 08:07:37 -0800 +Subject: [PATCH] xfs: fix a missing unlock on error in xfs_fs_map_blocks +Git-commit: 2bd3fa793aaa7e98b74e3653fdcc72fa753913b5 +Patch-mainline: v5.10-rc4 +References: git-fixes + +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 +Reviewed-by: Darrick J. Wong +Signed-off-by: Darrick J. Wong +Acked-by: Anthony Iliopoulos + +--- + 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 b101feb2aab4..f3082a957d5e 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.29.1 + diff --git a/series.conf b/series.conf index a7369ea..8aef7ce 100644 --- a/series.conf +++ b/series.conf @@ -56164,6 +56164,7 @@ patches.suse/pinctrl-intel-Set-default-bias-in-case-no-particular.patch patches.suse/xfs-fix-flags-argument-to-rmap-lookup-when-convertin.patch patches.suse/xfs-fix-rmap-key-and-record-comparison-functions.patch + patches.suse/xfs-fix-a-missing-unlock-on-error-in-xfs_fs_map_bloc.patch patches.suse/thunderbolt-Add-the-missed-ida_simple_remove-in-ring.patch # dhowells/linux-fs keys-uefi