lkml.org 
[lkml]   [2009]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/4] FUSE: make request_wait_answer() wait for ->end() completion
From
Date
On Thu, 18 Jun 2009, Tejun Heo wrote:
> Previously, a request was marked FINISHED before ->end() is executed
> and thus request_wait_answer() can return before it's done. This
> patch makes request_wait_answer() wait for ->end() to finish before
> returning.

Why is this change needed?

>
> Note that no current ->end() user waits for request completion, so
> this change doesn't cause any behavior difference.
>
> While at it, beef up the comment above ->end() hook and clarify when
> and where it's called.

OK.

[snip]

> @@ -293,10 +292,21 @@ __releases(&fc->lock)
> fc->active_background--;
> flush_bg_queue(fc);
> }
> +
> spin_unlock(&fc->lock);
> - wake_up(&req->waitq);
> - if (end)
> +
> + if (end) {
> end(fc, req);
> + smp_wmb();

Why is this barrier needed?

Thanks,
Miklos


\
 
 \ /
  Last update: 2009-06-24 12:05    [W:0.120 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site