diff options
author | Tony Battersby <tonyb@cybernetics.com> | 2009-03-31 22:24:15 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 15:59:19 (GMT) |
commit | d1bc90dd5d037079f96b3327f943eb6ae8ef7491 (patch) | |
tree | 0380bd32cee23815b214d81a12b618140c544799 /fs/autofs | |
parent | d0305882825784e74f68a56eee6c3a812a99f235 (diff) | |
download | linux-fsl-qoriq-d1bc90dd5d037079f96b3327f943eb6ae8ef7491.tar.xz |
epoll: remove unnecessary xchg
xchg in ep_unregister_pollwait() is unnecessary because it is protected by
either epmutex or ep->mtx (the same protection as ep_remove()).
If xchg was necessary, it would be insufficient to protect against
problems: if multiple concurrent calls to ep_unregister_pollwait() were
possible then a second caller that returns without doing anything because
nwait == 0 could return before the waitqueues are removed by the first
caller, which looks like it could lead to problematic races with
ep_poll_callback().
So remove xchg and add comments about the locking.
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs')
0 files changed, 0 insertions, 0 deletions