From 372c9329e5aa896683999301d9cb10ef14da92af Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Thu, 11 Jan 2018 17:48:29 +0100 Subject: [PATCH] dma-buf: clarify locking documentation for reservation_object_get_excl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The documentation was misleading, as for a lot of use-cases holding the RCU read side lock is sufficient. Signed-off-by: Lucas Stach Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20180111165302.25556-2-l.stach@pengutronix.de --- include/linux/reservation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/reservation.h b/include/linux/reservation.h index 2f0ffca35780..ee750765cc94 100644 --- a/include/linux/reservation.h +++ b/include/linux/reservation.h @@ -228,7 +228,8 @@ reservation_object_unlock(struct reservation_object *obj) * @obj: the reservation object * * Returns the exclusive fence (if any). Does NOT take a - * reference. The obj->lock must be held. + * reference. Writers must hold obj->lock, readers may only + * hold a RCU read side lock. * * RETURNS * The exclusive fence or NULL -- 2.30.2