Skip to content

Commit

Permalink
ipc/util.c: remove unnecessary work pending test
Browse files Browse the repository at this point in the history
Remove unnecessary work pending test before calling schedule_work().  It
has been tested in queue_work_on() already.  No functional changed.

Signed-off-by: Xie XiuQi <[email protected]>
Cc: Tejun Heo <[email protected]>
Reviewed-by: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Xie XiuQi authored and torvalds committed Nov 13, 2013
1 parent 66da0e1 commit 206fa94
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ipc/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ static int ipc_memory_callback(struct notifier_block *self,
* In order not to keep the lock on the hotplug memory chain
* for too long, queue a work item that will, when waken up,
* activate the ipcns notification chain.
* No need to keep several ipc work items on the queue.
*/
if (!work_pending(&ipc_memory_wq))
schedule_work(&ipc_memory_wq);
schedule_work(&ipc_memory_wq);
break;
case MEM_GOING_ONLINE:
case MEM_GOING_OFFLINE:
Expand Down

0 comments on commit 206fa94

Please sign in to comment.