[RH7,3/3] ext4: Avoid sleepable debug check in ext4_map_blocks_es_recheck() on ploop fastmap

Submitted by Kirill Tkhai on July 20, 2020, 11:03 a.m.

Details

Message ID 159524302977.71004.8526840048779385819.stgit@localhost.localdomain
State New
Series "Series without cover letter"
Headers show

Commit Message

Kirill Tkhai July 20, 2020, 11:03 a.m.
ext4_map_blocks_es_recheck() takes mutex, so we avoid it on fastmap.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/ext4/inode.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index a0f1e91d65d7..bc253a0f177c 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -518,8 +518,9 @@  int ext4_map_blocks(handle_t *handle, struct inode *inode,
 			BUG_ON(1);
 		}
 #ifdef ES_AGGRESSIVE_TEST
-		ext4_map_blocks_es_recheck(handle, inode, map,
-					   &orig_map, flags);
+		if (!(flags & EXT4_GET_BLOCKS_EXTENT_TREE_ONLY_NONBLOCK))
+			ext4_map_blocks_es_recheck(handle, inode, map,
+						   &orig_map, flags);
 #endif
 		goto found;
 	}