Re: [PATCH 3/3 v5] cxl/memdev: Use cond_guard() in cxl_inject_poison()

From: Jonathan Cameron
Date: Mon Feb 19 2024 - 06:53:02 EST


On Sat, 17 Feb 2024 11:59:04 +0100
"Fabio M. De Francesco" <fabio.maria.de.francesco@xxxxxxxxxxxxxxx> wrote:

> Use cond_guard() in cxl_inject_poison() to not open code two up_write()
> in an 'out' block. If the down_read_interruptible() fail, the statements
> passed as the second argument of cond_guard() return -EINTR.
>
> Cc: Dave Jiang <dave.jiang@xxxxxxxxx>
> Cc: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Suggested-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> Suggested-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> Signed-off-by: Fabio M. De Francesco <fabio.maria.de.francesco@xxxxxxxxxxxxxxx>

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>