[RHEL7,COMMIT] ext4: Avoid sleepable debug check in

Submitted by Vasily Averin on July 21, 2020, 4:45 a.m.

Details

Message ID 202007210445.06L4j6OW024428@vvs.co7.work.ct
State New
Series "Series without cover letter"
Headers show

Commit Message

Vasily Averin July 21, 2020, 4:45 a.m.
The commit is pushed to "branch-rh7-3.10.0-1127.10.1.vz7.162.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.10.1.vz7.162.10
------>
commit 31072ab3358507dbaf46f459748d39fb56efbd86
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Tue Jul 21 07:45:06 2020 +0300

    ext4: Avoid sleepable debug check in
    
    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 a0f1e91d65d77..bc253a0f177c2 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;
 	}