From: "J. Bruce Fields" <bfields@fieldses.org>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org, Julia Lawall <Julia.Lawall@lip6.fr>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1 linux-next] nfsd: use swap() in sort_pacl_range()
Date: Tue, 16 Jun 2015 11:27:09 -0400 [thread overview]
Message-ID: <20150616152709.GA2147@fieldses.org> (raw)
In-Reply-To: <1434128337-10366-1-git-send-email-fabf@skynet.be>
Applying, thanks.--b.
On Fri, Jun 12, 2015 at 06:58:57PM +0200, Fabian Frederick wrote:
> Use kernel.h macro definition.
>
> Thanks to Julia Lawall for Coccinelle scripting support.
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> fs/nfsd/nfs4acl.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
> index 7e10e2a..eb5accf 100644
> --- a/fs/nfsd/nfs4acl.c
> +++ b/fs/nfsd/nfs4acl.c
> @@ -372,7 +372,6 @@ pace_gt(struct posix_acl_entry *pace1, struct posix_acl_entry *pace2)
> static void
> sort_pacl_range(struct posix_acl *pacl, int start, int end) {
> int sorted = 0, i;
> - struct posix_acl_entry tmp;
>
> /* We just do a bubble sort; easy to do in place, and we're not
> * expecting acl's to be long enough to justify anything more. */
> @@ -382,9 +381,8 @@ sort_pacl_range(struct posix_acl *pacl, int start, int end) {
> if (pace_gt(&pacl->a_entries[i],
> &pacl->a_entries[i+1])) {
> sorted = 0;
> - tmp = pacl->a_entries[i];
> - pacl->a_entries[i] = pacl->a_entries[i+1];
> - pacl->a_entries[i+1] = tmp;
> + swap(pacl->a_entries[i],
> + pacl->a_entries[i + 1]);
> }
> }
> }
> --
> 2.4.2
prev parent reply other threads:[~2015-06-16 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 16:58 [PATCH 1/1 linux-next] nfsd: use swap() in sort_pacl_range() Fabian Frederick
2015-06-16 15:27 ` J. Bruce Fields [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=20150616152709.GA2147@fieldses.org \
--to=bfields@fieldses.org \
--cc=Julia.Lawall@lip6.fr \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@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