NVIDIA: SAUCE: Revert "NVIDIA: SAUCE: fs: eventpoll: Add smp_mb() before waitqueue_active"
This reverts commit 84256e2b9722b98d52c8441be53aed177802cf08.
Reason for revert:
Following upstream commit already patched the same issue:
81121524f1 "locking/rwbase: Take care of ordering guarantee for fastpath reader"
http://nvbugs/5217681
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Noah Wager <noah.wager@canonical.com>
Acked-by: Jacob Martin <jacob.martin@canonical.com>
Signed-off-by: Noah Wager <noah.wager@canonical.com>
This commit is contained in:
committed by
Noah Wager
parent
71fdd12a34
commit
e50fb9b3a7
+1
-10
@@ -671,7 +671,6 @@ static void ep_done_scan(struct eventpoll *ep,
|
||||
__pm_relax(ep->ws);
|
||||
|
||||
if (!list_empty(&ep->rdllist)) {
|
||||
smp_mb();
|
||||
if (waitqueue_active(&ep->wq))
|
||||
wake_up(&ep->wq);
|
||||
}
|
||||
@@ -1251,7 +1250,6 @@ static int ep_poll_callback(wait_queue_entry_t *wait, unsigned mode, int sync, v
|
||||
* Wake up ( if active ) both the eventpoll wait list and the ->poll()
|
||||
* wait list.
|
||||
*/
|
||||
smp_mb();
|
||||
if (waitqueue_active(&ep->wq)) {
|
||||
if ((epi->event.events & EPOLLEXCLUSIVE) &&
|
||||
!(pollflags & POLLFREE)) {
|
||||
@@ -1624,7 +1622,6 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,
|
||||
ep_pm_stay_awake(epi);
|
||||
|
||||
/* Notify waiting tasks that events are available */
|
||||
smp_mb();
|
||||
if (waitqueue_active(&ep->wq))
|
||||
wake_up(&ep->wq);
|
||||
if (waitqueue_active(&ep->poll_wait))
|
||||
@@ -1701,7 +1698,6 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi,
|
||||
ep_pm_stay_awake(epi);
|
||||
|
||||
/* Notify waiting tasks that events are available */
|
||||
smp_mb();
|
||||
if (waitqueue_active(&ep->wq))
|
||||
wake_up(&ep->wq);
|
||||
if (waitqueue_active(&ep->poll_wait))
|
||||
@@ -1956,11 +1952,8 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
|
||||
* important.
|
||||
*/
|
||||
eavail = ep_events_available(ep);
|
||||
if (!eavail) {
|
||||
spin_lock(&ep->wq.lock);
|
||||
if (!eavail)
|
||||
__add_wait_queue_exclusive(&ep->wq, &wait);
|
||||
spin_unlock(&ep->wq.lock);
|
||||
}
|
||||
|
||||
write_unlock_irq(&ep->lock);
|
||||
|
||||
@@ -1987,9 +1980,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
|
||||
*/
|
||||
if (timed_out)
|
||||
eavail = list_empty(&wait.entry);
|
||||
spin_lock(&ep->wq.lock);
|
||||
__remove_wait_queue(&ep->wq, &wait);
|
||||
spin_unlock(&ep->wq.lock);
|
||||
write_unlock_irq(&ep->lock);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user