Allow extents equal to max_zeroout to be zero-ed
diff mbox

Message ID 1464632627-37583-1-git-send-email-jhe@cs.wisc.edu
State New
Headers show

Commit Message

Jun He May 30, 2016, 6:23 p.m. UTC
Just to be consistent with the rest of the code: if size == max_zeroout,
then allow it to be zero-ed.

Signed-off-by: Jun He <jhe@cs.wisc.edu>
---
 fs/ext4/extents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 2a2eef9..dc0b04c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3609,7 +3609,7 @@  static int ext4_ext_convert_to_initialized(handle_t *handle,
 				goto out;
 			split_map.m_lblk = map->m_lblk;
 			split_map.m_len = allocated;
-		} else if (map->m_lblk - ee_block + map->m_len < max_zeroout) {
+		} else if (map->m_lblk - ee_block + map->m_len <= max_zeroout) {
 			/* case 2 */
 			if (map->m_lblk != ee_block) {
 				zero_ex.ee_block = ex->ee_block;