lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Jan 2017 23:12:59 +0800
From:   Coly Li <colyli@...e.de>
To:     Geliang Tang <geliangtang@...il.com>,
        Alasdair Kergon <agk@...hat.com>,
        Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com,
        Shaohua Li <shli@...nel.org>
Cc:     linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dm bio prison: use rb_entry()

On 2017/1/20 下午10:36, Geliang Tang wrote:
> To make the code clearer, use rb_entry() instead of container_of() to
> deal with rbtree.
> 
> Signed-off-by: Geliang Tang <geliangtang@...il.com>
> ---
>  drivers/md/dm-bio-prison.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/dm-bio-prison.c b/drivers/md/dm-bio-prison.c
> index 03af174..a2c8a9e 100644
> --- a/drivers/md/dm-bio-prison.c
> +++ b/drivers/md/dm-bio-prison.c
> @@ -115,7 +115,7 @@ static int __bio_detain(struct dm_bio_prison *prison,
>  
>  	while (*new) {
>  		struct dm_bio_prison_cell *cell =
> -			container_of(*new, struct dm_bio_prison_cell, node);
> +			rb_entry(*new, struct dm_bio_prison_cell, node);
>  
>  		r = cmp_keys(key, &cell->key);
>  
> 
Acked-by: Coly Li <colyli@...e.de>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ