From: walter harms <wharms@bfs.de>
To: David Howells <dhowells@redhat.com>
Cc: jaltman@auristor.com, linux-afs@lists.infradead.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] afs: Fix afs_xattr_get_yfs() to not try freeing an error value
Date: Mon, 13 May 2019 12:13:39 +0200 [thread overview]
Message-ID: <5CD94353.90702@bfs.de> (raw)
In-Reply-To: <6819.1557691584@warthog.procyon.org.uk>
Am 12.05.2019 22:06, schrieb David Howells:
> walter harms <wharms@bfs.de> wrote:
>
>> Sorry, you misunderstood me, my fault, i did not see that size is unsigned.
>> NTL i do not think size=0 is useful.
>
> Allow me to quote from the getxattr manpage:
>
> If size is specified as zero, these calls return the current size of
> the named extended attribute (and leave value unchanged). This can be
> used to determine the size of the buffer that should be supplied in a
> subsequent call. [...]
>
ok, sorry for the noise i did not know, for me that look unintended.
>> while you are there:
>> flags |= YFS_ACL_WANT_ACL is always flags = YFS_ACL_WANT_ACL;
>> since flags is 0 at this point.
>> IMHO that sould be moved to the strcmp() section.
>
> Why? It makes the strcmp() section more complicated and means I now either
> have to cache flags in a variable or do the allocation of yacl first.
>
no need to cache, the idea was only to make the correlation between the name
and flags more obvious. (no need to hurry, i just noticed it)
if (strcmp(name, "acl") == 0) {
which = 0;
flags = YFS_ACL_WANT_ACL;
}
else if (strcmp(name, "acl_inherited") == 0) {
which = 1;
flags = 0;
}
else if (strcmp(name, "acl_num_cleaned") == 0) {
which = 2;
flags = 0;
}
else if (strcmp(name, "vol_acl") == 0) {
which = 3;
flags = YFS_ACL_WANT_VOL_ACL;
}
....
re,
wh
> David
>
prev parent reply other threads:[~2019-05-13 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-12 7:45 [PATCH 1/2] afs: Fix incorrect error handling in afs_xattr_get_acl() David Howells
2019-05-12 7:45 ` [PATCH 2/2] afs: Fix afs_xattr_get_yfs() to not try freeing an error value David Howells
2019-05-12 16:07 ` walter harms
2019-05-12 18:10 ` David Howells
2019-05-12 18:44 ` walter harms
2019-05-12 20:06 ` David Howells
2019-05-13 10:13 ` walter harms [this message]
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=5CD94353.90702@bfs.de \
--to=wharms@bfs.de \
--cc=dhowells@redhat.com \
--cc=jaltman@auristor.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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