linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.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 <wenqing.lz@taobao.com>
Subject: [PATCH 1/4][RFC] ext4: remove duplicated check from ext4_fallocate
Date: Tue, 20 Nov 2012 17:29:42 +0800	[thread overview]
Message-ID: <1353403785-3489-2-git-send-email-wenqing.lz@taobao.com> (raw)
In-Reply-To: <1353403785-3489-1-git-send-email-wenqing.lz@taobao.com>

From: Zheng Liu <wenqing.lz@taobao.com>

Remove a sanity check from ext4_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/ext4/extents.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 7011ac9..c2eb409 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4427,10 +4427,6 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
 	if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
 		return -EOPNOTSUPP;
 
-	/* Return error if mode is not supported */
-	if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
-		return -EOPNOTSUPP;
-
 	if (mode & FALLOC_FL_PUNCH_HOLE)
 		return ext4_punch_hole(file, offset, len);
 
-- 
1.7.12.rc2.18.g61b472e


  reply	other threads:[~2012-11-20  9:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-20  9:29 [PATCH 0/4][RFC] remove duplicated check from ext4, xfs, btrfs, and ocfs2 Zheng Liu
2012-11-20  9:29 ` Zheng Liu [this message]
2012-11-20 16:11   ` [PATCH 1/4][RFC] ext4: remove duplicated check from ext4_fallocate Nehemiah Dacres
2012-11-20  9:29 ` [PATCH 2/4][RFC] xfs: remove duplicated check from xfs_file_fallocate Zheng Liu
2012-11-20  9:29 ` [PATCH 3/4][RFC] btrfs: remove duplicated check from btrfs_fallocate Zheng Liu
2012-11-20  9:29 ` [PATCH 4/4][RFC] ocfs2: remove duplicated check from ocfs2_fallocate Zheng Liu
2012-11-20 10:14 ` [PATCH 0/4][RFC] remove duplicated check from ext4, xfs, btrfs, and ocfs2 Christoph Hellwig
2012-11-20 10:46   ` Zheng Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353403785-3489-2-git-send-email-wenqing.lz@taobao.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=wenqing.lz@taobao.com \
    --cc=xfs@oss.sgi.com \
    --cc=yan@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).