From: Rohan Puri <rohan.puri15@gmail.com>
To: "Lukáš Czerner" <lczerner@redhat.com>
Cc: hch@infradead.org, viro@zeniv.linux.org.uk,
Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 2/2] Remove redundant inode mode checks for ceph & ext4
Date: Fri, 18 Jul 2014 16:16:26 +0530 [thread overview]
Message-ID: <CALJfu6OQ9SWy7DYVJOS2s1OA0gMiQDPeA4KupxgtTwDw6TFQ+A@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1407181231290.12453@localhost.localdomain>
On Fri, Jul 18, 2014 at 4:02 PM, Lukáš Czerner <lczerner@redhat.com> wrote:
> On Fri, 18 Jul 2014, Rohan Puri wrote:
>
>> Date: Fri, 18 Jul 2014 15:28:38 +0530
>> 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
>>
>> These checks are not needed here, since they are already performed
>> by do_fallocate()
>
> NAK, they are actually needed because we do not support fallocate on
> directories here.
>
But we never get to file systems for fallocate in directory case, we
either return from open() itself
or do_fallocate() before calling f_ops->fallocate()
> -Lukas
>
>>
>> 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);
>>
>> /*
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-07-18 10:46 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 ` [PATCH 2/2] Remove redundant inode mode checks for ceph & ext4 Rohan Puri
2014-07-18 10:32 ` Lukáš Czerner
2014-07-18 10:46 ` Rohan Puri [this message]
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=CALJfu6OQ9SWy7DYVJOS2s1OA0gMiQDPeA4KupxgtTwDw6TFQ+A@mail.gmail.com \
--to=rohan.puri15@gmail.com \
--cc=hch@infradead.org \
--cc=lczerner@redhat.com \
--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).