[PATCH] Allow extents equal to max_zeroout to be zero-ed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 fs/ext4/extents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
--
1.9.1

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



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux