diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 35dd7371752a..0f75746ab06e 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1030,6 +1030,13 @@ static int sock_fasync(int fd, struct file *filp, int on) | |||
1030 | 1030 | ||
1031 | lock_sock(sk); | 1031 | lock_sock(sk); |
1032 | 1032 | ||
1033 | spin_lock(&filp->f_lock); | ||
1034 | if (on) | ||
1035 | filp->f_flags |= FASYNC; | ||
1036 | else | ||
1037 | filp->f_flags &= ~FASYNC; | ||
1038 | spin_unlock(&filp->f_lock); | ||
1039 | |||
1033 | prev = &(sock->fasync_list); | 1040 | prev = &(sock->fasync_list); |
1034 | 1041 | ||
1035 | for (fa = *prev; fa != NULL; prev = &fa->fa_next, fa = *prev) | 1042 | for (fa = *prev; fa != NULL; prev = &fa->fa_next, fa = *prev) |