]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/unix/af_unix.c
Merge remote-tracking branch 'net-next/master'
[karo-tx-linux.git] / net / unix / af_unix.c
index 29be035f9c65024fcaf4fe483a81702d6877217f..a6d6654697779060ecdeeb34c75fcfe7e618f433 100644 (file)
@@ -1534,7 +1534,6 @@ static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
 {
        int i;
        unsigned char max_level = 0;
-       int unix_sock_count = 0;
 
        if (too_many_unix_fds(current))
                return -ETOOMANYREFS;
@@ -1542,11 +1541,9 @@ static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
        for (i = scm->fp->count - 1; i >= 0; i--) {
                struct sock *sk = unix_get_socket(scm->fp->fp[i]);
 
-               if (sk) {
-                       unix_sock_count++;
+               if (sk)
                        max_level = max(max_level,
                                        unix_sk(sk)->recursion_level);
-               }
        }
        if (unlikely(max_level > MAX_RECURSION_LEVEL))
                return -ETOOMANYREFS;