From: Rohan Puri <rohan.puri15@gmail.com>
To: hch@infradead.org, viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/2] Remove redundant inode mode checks for ceph & ext4
Date: Fri, 18 Jul 2014 15:28:38 +0530 [thread overview]
Message-ID: <5392d55b272f9a5bd64961cc296ea79c1f41f556.1405676678.git.rohan.puri15@gmail.com> (raw)
In-Reply-To: <cover.1405676678.git.rohan.puri15@gmail.com>
These checks are not needed here, since they are already performed
by do_fallocate()
Signed-off-by: Rohan Puri <rohan.puri15@gmail.com>
---
fs/ceph/file.c | 3 ---
fs/ext4/inode.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 88a6df4..687a72e 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -1218,9 +1218,6 @@ static long ceph_fallocate(struct file *file, int mode,
loff_t endoff = 0;
loff_t size;
- if (!S_ISREG(inode->i_mode))
- return -EOPNOTSUPP;
-
mutex_lock(&inode->i_mutex);
if (ceph_snap(inode) != CEPH_NOSNAP) {
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 7fcd68e..22c9868 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3532,9 +3532,6 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
unsigned int credits;
int ret = 0;
- if (!S_ISREG(inode->i_mode))
- return -EOPNOTSUPP;
-
trace_ext4_punch_hole(inode, offset, length, 0);
/*
--
1.9.1
next prev parent reply other threads:[~2014-07-18 9:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 9:50 [PATCH 0/2] fallocate(2) related cleanups Rohan Puri
2014-07-18 9:57 ` [PATCH 1/2] Remove misleading comment in do_fallocate() Rohan Puri
2014-07-18 10:35 ` Lukáš Czerner
[not found] ` <CALJfu6Ok_jdNqacsEKnnVvzxSxCuRC7dA0abve28BASaAgB31A@mail.gmail.com>
2014-07-18 10:47 ` Fwd: " Rohan Puri
2014-07-18 11:17 ` Lukáš Czerner
2014-07-18 12:32 ` Rohan Puri
2014-07-18 9:58 ` Rohan Puri [this message]
2014-07-18 10:32 ` [PATCH 2/2] Remove redundant inode mode checks for ceph & ext4 Lukáš Czerner
2014-07-18 10:46 ` Rohan Puri
2014-07-18 11:18 ` Lukáš Czerner
2014-07-18 12:33 ` Rohan Puri
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=5392d55b272f9a5bd64961cc296ea79c1f41f556.1405676678.git.rohan.puri15@gmail.com \
--to=rohan.puri15@gmail.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).