From patchwork Tue Nov 20 09:29:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 1772031 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D50F83FC5A for ; Tue, 20 Nov 2012 09:17:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752906Ab2KTJRX (ORCPT ); Tue, 20 Nov 2012 04:17:23 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:51686 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752773Ab2KTJRU (ORCPT ); Tue, 20 Nov 2012 04:17:20 -0500 Received: by mail-pb0-f46.google.com with SMTP id wy7so4139518pbc.19 for ; Tue, 20 Nov 2012 01:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=U3p3z+KrRjcHLpn3kNOtbYbrmq1AgzaTUTd9ANfazQ8=; b=Ixo8gnlT8i0AGXRHw+2VvdXC6SkYXaH6TFkWrhD9b8cNueBFF9v0TKjsVWqh5+Aufo ko0AMzuoUmbMTfQni/9fgchPGcsIgbT5u807/TrosBSAiCBovF5Lk3MuORsyxOKMAjID vpG9gcFUlGnwaB+zQ8U/Ps1KUOF4yg0JpjMylB7Fo7KdY4OoBu4jDXM91otUXIyYgWE1 ED49c7+oascmuc7vbqbPSMD4sEbqSIC86E7foQ55rV4/rFGdFPMZdvSiGz31WilmN0Y5 VGp6vgN0nB5YW8imm/6raxvePLTUozyLs5FHZ3djeB1IVUxQQHl3XAjD2GRMHpyIST4l 9yog== Received: by 10.66.87.34 with SMTP id u2mr6261147paz.82.1353403039394; Tue, 20 Nov 2012 01:17:19 -0800 (PST) Received: from lz-desktop.taobao.ali.com ([182.92.247.2]) by mx.google.com with ESMTPS id t1sm7770405paw.11.2012.11.20.01.17.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 01:17:18 -0800 (PST) From: Zheng Liu 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 Subject: [PATCH 2/4][RFC] xfs: remove duplicated check from xfs_file_fallocate Date: Tue, 20 Nov 2012 17:29:43 +0800 Message-Id: <1353403785-3489-3-git-send-email-wenqing.lz@taobao.com> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: <1353403785-3489-1-git-send-email-wenqing.lz@taobao.com> References: <1353403785-3489-1-git-send-email-wenqing.lz@taobao.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org 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;