From patchwork Tue Nov 20 09:29:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/4,RFC] ext4: remove duplicated check from ext4_fallocate X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 200269 Message-Id: <1353403785-3489-2-git-send-email-wenqing.lz@taobao.com> To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, xfs@oss.sgi.com, linux-btrfs@vger.kernel.org, ocfs2-devel@oss.oracle.com Cc: yan@linux.vnet.ibm.com, Zheng Liu Date: Tue, 20 Nov 2012 17:29:42 +0800 From: Zheng Liu List-Id: From: Zheng Liu Remove a sanity check from ext4_fallocate because vfs has already checked it. Reported-by: Guo Chao Signed-off-by: Zheng Liu --- fs/ext4/extents.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 7011ac9..c2eb409 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4427,10 +4427,6 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) return -EOPNOTSUPP; - /* Return error if mode is not supported */ - if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) - return -EOPNOTSUPP; - if (mode & FALLOC_FL_PUNCH_HOLE) return ext4_punch_hole(file, offset, len);