Skip to content

Commit 1e79892

Browse files
ubizjakliu-song-6
authored andcommitted
md/raid5-ppl: Use atomic64_inc_return() in ppl_new_iounit()
Use atomic64_inc_return(&ref) instead of atomic64_add_return(1, &ref) to use optimized implementation and ease register pressure around the primitive for targets that implement optimized variant. Signed-off-by: Uros Bizjak <[email protected]> Cc: Song Liu <[email protected]> Cc: Yu Kuai <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Reviewed-by: Artur Paszkiewicz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Song Liu <[email protected]>
1 parent 2a8f615 commit 1e79892

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/raid5-ppl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static struct ppl_io_unit *ppl_new_iounit(struct ppl_log *log,
258258
memset(pplhdr->reserved, 0xff, PPL_HDR_RESERVED);
259259
pplhdr->signature = cpu_to_le32(ppl_conf->signature);
260260

261-
io->seq = atomic64_add_return(1, &ppl_conf->seq);
261+
io->seq = atomic64_inc_return(&ppl_conf->seq);
262262
pplhdr->generation = cpu_to_le64(io->seq);
263263

264264
return io;

0 commit comments

Comments
 (0)