ipc/util.c: remove unnecessary work pending test
authorXie XiuQi <xiexiuqi@huawei.com>
Tue, 12 Nov 2013 23:11:46 +0000 (15:11 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:36 +0000 (12:09 +0900)
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 <xiexiuqi@huawei.com>
Cc: Tejun Heo <tj@kernel.org>
Reviewed-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/util.c

index 7684f41..3ae17a4 100644 (file)
@@ -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: