Skip to content

Commit

Permalink
fuse: optimize wake_up
Browse files Browse the repository at this point in the history
Normally blocked_waitq will be inactive, so optimize this case.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  • Loading branch information
Miklos Szeredi committed Apr 17, 2013
1 parent 722d2be commit 3c18ef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ __releases(fc->lock)
fc->blocked = 0;

/* Wake up next waiter, if any */
if (!fc->blocked)
if (!fc->blocked && waitqueue_active(&fc->blocked_waitq))
wake_up(&fc->blocked_waitq);

if (fc->num_background == fc->congestion_threshold &&
Expand Down

0 comments on commit 3c18ef8

Please sign in to comment.