Patchwork [4/4,RFC] ocfs2: remove duplicated check from ocfs2_fallocate

login
register
mail settings
Submitter Zheng Liu
Date Nov. 20, 2012, 9:29 a.m.
Message ID <1353403785-3489-5-git-send-email-wenqing.lz@taobao.com>
Download mbox | patch
Permalink /patch/200266/
State Not Applicable
Headers show

Comments

Zheng Liu - Nov. 20, 2012, 9:29 a.m.
From: Zheng Liu <wenqing.lz@taobao.com>

Remove a sanity check from ocfs2_fallocate because vfs has already checked it.

Reported-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 fs/ocfs2/file.c | 2 --
 1 file changed, 2 deletions(-)

Patch

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;