diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index d7ccb7f51dfca695040b238a7ceadc256a9d90f4..7f69347bd5a5452e0c0da9f241cd13694a490476 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5734,6 +5734,9 @@ int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len) up_write(&EXT4_I(inode)->i_data_sem); goto out_stop; } + } else { + ext4_ext_drop_refs(path); + kfree(path); } ret = ext4_es_remove_extent(inode, offset_lblk,