From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] NET : cleanup sock_from_file()
Date: Thu, 08 Feb 2007 15:00:09 -0800 (PST) [thread overview]
Message-ID: <20070208.150009.92582755.davem@davemloft.net> (raw)
In-Reply-To: <45C9093D.1030605@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Wed, 07 Feb 2007 00:03:25 +0100
> I believe dead code from sock_from_file() can be cleaned up.
>
> All sockets are now built using sock_attach_fd(), that puts the 'sock' pointer
> into file->private_data and &socket_file_ops into file->f_op
>
> I could not find a place where file->private_data could be set to NULL,
> keeping opened the file.
>
> So to get 'sock' from a 'file' pointer, either :
>
> - This is a socket file (f_op == &socket_file_ops), and we can directly get
> 'sock' from private_data.
> - This is not a socket, we return -ENOTSOCK and dont even try to find a socket
> via dentry/inode :)
>
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Looks good to me, applied, thanks Eric.
next prev parent reply other threads:[~2007-02-08 23:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-02 12:05 [PATCH 0/7] [S390]: Introduction of AF_IUCV sockets support Frank Pavlic
2007-02-06 22:41 ` David Miller
2007-02-06 23:03 ` [PATCH] NET : cleanup sock_from_file() Eric Dumazet
2007-02-08 21:35 ` [PATCH 2/5] NET : Convert ipv4 route to use the new dst_entry 'next' pointer Eric Dumazet
2007-02-08 21:36 ` [PATCH 3/5] NET : Convert ipv6 " Eric Dumazet
2007-02-08 21:39 ` [PATCH 4/5] NET : Convert decnet " Eric Dumazet
2007-02-08 21:44 ` [PATCH 4/5 resend] " Eric Dumazet
2007-02-08 21:41 ` [PATCH 5/5] NET : Reorder fields of struct dst_entry Eric Dumazet
2007-02-08 23:00 ` David Miller [this message]
2007-02-07 10:31 ` [PATCH 0/7] [S390]: Introduction of AF_IUCV sockets support Frank Pavlic
2007-02-07 11:36 ` Frank Pavlic
2007-02-08 22:00 ` David Miller
2007-02-09 19:15 ` Frank Pavlic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070208.150009.92582755.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dada1@cosmosbay.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).