Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9cb00419 authored by Zheng Liu's avatar Zheng Liu Committed by Theodore Ts'o
Browse files

ext4: enable punch hole for bigalloc



After applied this commit (d23142c6), ext4 has supported punch hole for
a file system with bigalloc feature.  But we forgot to enable it.  This
commit fixes it.

Cc: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: default avatarZheng Liu <wenqing.lz@taobao.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent d0abafac
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -3501,11 +3501,6 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
	if (!S_ISREG(inode->i_mode))
	if (!S_ISREG(inode->i_mode))
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;


	if (EXT4_SB(sb)->s_cluster_ratio > 1) {
		/* TODO: Add support for bigalloc file systems */
		return -EOPNOTSUPP;
	}

	trace_ext4_punch_hole(inode, offset, length);
	trace_ext4_punch_hole(inode, offset, length);


	/*
	/*