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
| ||
|
Date: Tue, 17 Nov 2015 11:24:10 +0800 From: yalin wang <yalin.wang2010@...il.com> To: axboe@...nel.dk, linux-kernel@...r.kernel.org Cc: yalin wang <yalin.wang2010@...il.com> Subject: [RFC] block: change to use atomic_inc_return_release() Some arch define this atomic_inc_return_release() OP. Signed-off-by: yalin wang <yalin.wang2010@...il.com> --- block/bio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/bio.c b/block/bio.c index fbc558b..b251857 100644 --- a/block/bio.c +++ b/block/bio.c @@ -310,8 +310,7 @@ static void bio_chain_endio(struct bio *bio, int error) static inline void bio_inc_remaining(struct bio *bio) { bio->bi_flags |= (1 << BIO_CHAIN); - smp_mb__before_atomic(); - atomic_inc(&bio->__bi_remaining); + atomic_inc_return_release(&bio->__bi_remaining); } /** -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists