Thread (39 messages) 39 messages, 7 authors, 2018-06-18

Re: [PATCH] bdi: Fix another oops in wb_workfn()

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2018-06-13 14:55:44
Also in: linux-fsdevel, lkml

Possibly related (same subject, not in this thread)

On Wed, Jun 13, 2018 at 7:46 AM Jan Kara [off-list ref] wrote:
On Wed 13-06-18 19:43:47, Tetsuo Handa wrote:
quoted
Can't we utilize RCU grace period (like shown below) ?
Honestly, the variant 1 looks too ugly to me. However variant 2 looks
mostly OK.
The versions that don't have that conditional locking look fine to me, yes.
Also I'd avoid the addition argument to wb_writeback() and split the function instead. The
patch resulting from your and mine ideas is attached. Thoughts?
Is there a reason for this model:

+               if (cgwb_start_shutdown(wb))
+                       __wb_shutdown(wb);

when there is just one call site of this? Why not just make the
function void, and make it do that __wb_shutdown() itself in the true
case?

IOW, just make it be

+               cgwb_shutdown(wb);

instead?

That's what "wb_shutdown()" does - it does the "wb_start_shutdown()"
test internally, and does __wb_shutdown() all inside itself, instead
of expecting the caller to do it.

I dunno.

              Linus

              Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help