summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/extents.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index c1de66c23dd2..b543a46fc809 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4445,9 +4445,11 @@ out:
* need to re-calculate the depth as it might have changed due to block
* allocation.
*/
- if (flags & EXT4_GET_BLOCKS_QUERY_LAST_IN_LEAF)
+ if (flags & EXT4_GET_BLOCKS_QUERY_LAST_IN_LEAF) {
+ WARN_ON_ONCE(flags & EXT4_GET_BLOCKS_CREATE);
if (!err && ex && (ex == EXT_LAST_EXTENT(path[depth].p_hdr)))
map->m_flags |= EXT4_MAP_QUERY_LAST_IN_LEAF;
+ }
ext4_free_ext_path(path);