Browse Source

fuse: optimize wake_up

Normally blocked_waitq will be inactive, so optimize this case.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Miklos Szeredi 12 years ago
parent
commit
3c18ef8117
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fs/fuse/dev.c

+ 1 - 1
fs/fuse/dev.c

@@ -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 &&