From patchwork Tue Nov 20 09:29:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4/4,RFC] ocfs2: remove duplicated check from ocfs2_fallocate Date: Mon, 19 Nov 2012 23:29:45 -0000 From: Zheng Liu X-Patchwork-Id: 200266 Message-Id: <1353403785-3489-5-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 From: Zheng Liu Remove a sanity check from ocfs2_fallocate because vfs has already checked it. Reported-by: Guo Chao Signed-off-by: Zheng Liu --- fs/ocfs2/file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 5a4ee77..2446efa 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2001,8 +2001,6 @@ static long ocfs2_fallocate(struct file *file, int mode, loff_t offset, int change_size = 1; int cmd = OCFS2_IOC_RESVSP64; - if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) - return -EOPNOTSUPP; if (!ocfs2_writes_unwritten_extents(osb)) return -EOPNOTSUPP;