Messages in this thread | | | Subject | Re: [PATCH 2/4] FUSE: make request_wait_answer() wait for ->end() completion | From | Miklos Szeredi <> | Date | Wed, 24 Jun 2009 12:02:47 +0200 |
| |
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
| |