From: Eric Biggers <ebiggers@google.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, tytso@mit.edu
Subject: Re: [PATCH] fscrypto: make filename crypto functions return 0 on success
Date: Thu, 15 Sep 2016 10:22:40 -0700 [thread overview]
Message-ID: <20160915172240.GA144398@google.com> (raw)
In-Reply-To: <20160915165412.GA52239@jaegeuk>
On Thu, Sep 15, 2016 at 09:54:12AM -0700, Jaegeuk Kim wrote:
>
> Hmm, your patch tries to change the return value and make its usage more
> consistent. So, I think it should have been considered to change if (err < 0)
> to if (err) entirely in order to avoid any potential mistake; this patch already
> addresses it in some cases, but not all.
>
> e.g., in f2fs_symlink,
>
> err = fscrypt_fname_usr_to_disk(inode, &istr, &ostr);
> if (err < 0)
> goto err_out;
>
> BTW, in dx_show_leaf(),
> res = fscrypt_fname_disk_to_usr(dir,
> 0, 0, &de_name,
> &fname_crypto_str);
> if (res < 0)
> ...
>
> IMHO, it'd be better to use err instead of {res|ret} when considering naming
> convention.
Well, I had wanted to avoid bloating the patch.
I do like the idea of the greater consistency, though.
I'll post a version of the patch that does as you're suggesting.
Eric
next prev parent reply other threads:[~2016-09-15 17:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 23:00 [PATCH] fscrypto: make filename crypto functions return 0 on success Eric Biggers
2016-09-15 0:10 ` Jaegeuk Kim
2016-09-15 2:54 ` Eric Biggers
2016-09-15 16:54 ` Jaegeuk Kim
2016-09-15 17:22 ` Eric Biggers [this message]
2016-09-15 9:50 ` Andreas Dilger
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=20160915172240.GA144398@google.com \
--to=ebiggers@google.com \
--cc=jaegeuk@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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).