[SCTP]: Use the flags value that is passed as an arg to sctp_accept.
authorSridhar Samudrala <sri@us.ibm.com>
Tue, 22 Aug 2006 07:24:09 +0000 (00:24 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 21:55:19 +0000 (14:55 -0700)
No need to do multiple dereferences - sk->sk_socket->file->f_flags

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c

index 30d2dbeebb43395098b3278adcfc1e806dc8874e..3b6e82cb372f45c0846e694a8a150dcb2ea5427d 100644 (file)
@@ -2970,7 +2970,7 @@ SCTP_STATIC struct sock *sctp_accept(struct sock *sk, int flags, int *err)
                goto out;
        }
 
-       timeo = sock_rcvtimeo(sk, sk->sk_socket->file->f_flags & O_NONBLOCK);
+       timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK);
 
        error = sctp_wait_for_accept(sk, timeo);
        if (error)