From patchwork Tue Nov 20 09:29:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 1772051 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 26D513FCF7 for ; Tue, 20 Nov 2012 09:17:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753007Ab2KTJR1 (ORCPT ); Tue, 20 Nov 2012 04:17:27 -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 S1752974Ab2KTJRZ (ORCPT ); Tue, 20 Nov 2012 04:17:25 -0500 Received: by mail-pb0-f46.google.com with SMTP id wy7so4139518pbc.19 for ; Tue, 20 Nov 2012 01:17:25 -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=/2/glSSi7LtDZ0Wm5cWuzwxl+38zMdkQqf35is26knI=; b=rp6mJPyQXUFZ2FQ6DQKp3G/q1oBLRRU7X8KH0i5Xq0Itv/UoZ/euQHXAzp8vKLSMLs Kqc6TJpmbQXBP/EjqBTDdnf9Dz7NQ3c0TNcTyt8Kc/5ANepaBDlau1t/MX85NxJYopZL +Qs0MGH7Vz+b23s7aZxcsx4O6fihMRyOFryvzUk+7GZAORSS1PmDnU9DJDmBYojX99nt Zhu1XzpLxAj3SPMYXezhg/9V7l9Mtf8CuFx44dEpOpZ5SGu/nOvRkoOmeGyy1cxCq89R h6/aAiLgoK5f3omUSIyzPlOITvpkrZ6N7AnywbbYkKkquV0NNQcf/Phrpa9MGomFymhF iXcg== Received: by 10.68.203.72 with SMTP id ko8mr41372550pbc.78.1353403045204; Tue, 20 Nov 2012 01:17:25 -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.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 01:17:24 -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 4/4][RFC] ocfs2: remove duplicated check from ocfs2_fallocate Date: Tue, 20 Nov 2012 17:29:45 +0800 Message-Id: <1353403785-3489-5-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 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;