lkml.org 
[lkml]   [2012]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [flame^Wreview] net: netprio_cgroup: rework update socket logic
    From
    Date
    On Sun, 2012-08-12 at 22:55 -0700, John Fastabend wrote:
    > On 8/12/2012 6:53 PM, Al Viro wrote:
    > > Ladies and gentlemen, who the devil had reviewed that little gem?
    > >
    > > commit 406a3c638ce8b17d9704052c07955490f732c2b8
    > > Author: John Fastabend <john.r.fastabend@intel.com>
    > > Date: Fri Jul 20 10:39:25 2012 +0000
    []
    > OK clearly I screwed it up thanks for reviewing Al. How about this.
    >
    > fdt = files_fdtable(files);
    > for (fd = 0; fd < fdt->max_fds; fd++) {
    > struct socket *sock;
    > int err = 0;

    Don't need to initialize err if you're not using it.

    > sock = sockfd_lookup(fd, &err);
    > if (!sock) {

    Of course you mean
    if (sock)

    > lock_sock(sock->sk);
    > sock_update_netprioidx(sock->sk, p);
    > release_sock(sock->sk);
    > sockfd_put(sock);
    > }
    > }




    \
     
     \ /
      Last update: 2012-08-13 11:43    [W:0.024 / U:61.276 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site