From patchwork Tue Nov 20 09:29:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/4,RFC] xfs: remove duplicated check from xfs_file_fallocate Date: Mon, 19 Nov 2012 23:29:43 -0000 From: Zheng Liu X-Patchwork-Id: 200268 Message-Id: <1353403785-3489-3-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 xfs_file_fallocate because vfs has already checked it. Reported-by: Guo Chao Signed-off-by: Zheng Liu --- fs/xfs/xfs_file.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index aa473fa..7b50d12 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -815,9 +815,6 @@ xfs_file_fallocate( int cmd = XFS_IOC_RESVSP; int attr_flags = XFS_ATTR_NOLOCK; - if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) - return -EOPNOTSUPP; - bf.l_whence = 0; bf.l_start = offset; bf.l_len = len;