From: Tao Ma <tm@tao.ma>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Boxi Liu <boxi10liu@gmail.com>,
"lewis.liulei" <lewis.liulei@huawei.com>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
Robin Dong <sanbai@taobao.com>
Subject: Re: fix the ext4_read_inline_dir return value
Date: Thu, 31 Oct 2013 10:34:31 +0800 [thread overview]
Message-ID: <5271C1B7.8040009@tao.ma> (raw)
In-Reply-To: <20131030121341.GB12186@thunk.org>
On 10/30/2013 08:13 PM, Theodore Ts'o wrote:
> Applied, thanks.
>
> On Tue, Oct 22, 2013 at 10:10:27AM +0800, Tao Ma wrote:
>> But next time please generate the patch with git format-patch and send
>> it using git send-email.
>
> Yes, please. :-)
>
> I've reworded the commit description a little.
>
> In ext4_read_inline_dir(), if there is inline data, the successful
> return value is the return value of ext4_read_inline_data(). Howewer,
> this is used by ext4_readdir(), and while it seems harmless to return
> a positive value on success, it's inconsistent, since historically
> we've always return 0 on success.
>
>
> BTW, it looks like it would simplify the code a bit to change
> ext4_read_inline_page() and ext4_read_line_data() to return 0 on
> success, since it looks like the positive value on success isn't
> needed anywhere, and this would allow us to remove lines such as this:
>
> return ret >= 0 ? 0 : ret;
>
> as well as the forced ret = 0; in this commit.
>
> Could you take a look and verify that this is true, and I haven't
> missed anything?
sure, I will look into it.
>
> Also, it would be nice if the functions in fs/ext4/inline.c documented
> what the return values are for each of the functions, one way or
> another.
OK, I will try to generate a patch for it.
Thanks,
Tao
>
> Thanks!!
>
> - Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" 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:[~2013-10-31 2:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 16:33 fix the ext4_read_inline_dir return value Boxi Liu
2013-10-21 17:35 ` jon ernst
2013-10-22 2:10 ` Tao Ma
2013-10-30 12:13 ` Theodore Ts'o
2013-10-31 2:34 ` Tao Ma [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-09-17 15:08 Boxi Liu
2013-09-17 16:29 ` Jan Kara
2013-09-17 17:30 ` Boxi Liu
2013-09-17 17:38 ` Jan Kara
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=5271C1B7.8040009@tao.ma \
--to=tm@tao.ma \
--cc=boxi10liu@gmail.com \
--cc=lewis.liulei@huawei.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sanbai@taobao.com \
--cc=tytso@mit.edu \
/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).