On Mon, Dec 4, 2023 at 2:44 PM Juergen Gross <[email protected]> wrote: > >> Personally I prefer to keep the "goto out", rather than duplicating > >> the rcu_read_unlock(). I'd yield if Jan said he preferred > >> duplication, however. > > > > I'm on the edge there actually. > > In this case I'd prefer it my way, as it avoids having to scroll down to the > out: label to see what is happening there. Additionally it enables to get rid > of the ret variable.
The issue is, suppose we change something else, like needing to grab (and release) another lock? Sharing the exit path makes it easier to avoid those kinds of mistakes. -George
