mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile #2 from Al Viro: "Next pile (and there'll be one or two more). The large piece in this one is getting rid of /proc/*/ns/* weirdness; among other things, it allows to (finally) make nameidata completely opaque outside of fs/namei.c, making for easier further cleanups in there" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: coda_venus_readdir(): use file_inode() fs/namei.c: fold link_path_walk() call into path_init() path_init(): don't bother with LOOKUP_PARENT in argument fs/namei.c: new helper (path_cleanup()) path_init(): store the "base" pointer to file in nameidata itself make default ->i_fop have ->open() fail with ENXIO make nameidata completely opaque outside of fs/namei.c kill proc_ns completely take the targets of /proc/*/ns/* symlinks to separate fs bury struct proc_ns in fs/proc copy address of proc_ns_ops into ns_common new helpers: ns_alloc_inum/ns_free_inum make proc_ns_operations work with struct ns_common * instead of void * switch the rest of proc_ns_operations to working with &...->ns netns: switch ->get()/->put()/->install()/->inum() to working with &net->ns make mntns ->get()/->put()/->install()/->inum() work with &mnt_ns->ns common object embedded into various struct ....ns
This commit is contained in:
commit
603ba7e41b
36 changed files with 416 additions and 430 deletions
19
net/socket.c
19
net/socket.c
|
@ -113,7 +113,6 @@ unsigned int sysctl_net_busy_read __read_mostly;
|
|||
unsigned int sysctl_net_busy_poll __read_mostly;
|
||||
#endif
|
||||
|
||||
static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
|
||||
static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
|
||||
unsigned long nr_segs, loff_t pos);
|
||||
static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
|
@ -151,7 +150,6 @@ static const struct file_operations socket_file_ops = {
|
|||
.compat_ioctl = compat_sock_ioctl,
|
||||
#endif
|
||||
.mmap = sock_mmap,
|
||||
.open = sock_no_open, /* special open code to disallow open via /proc */
|
||||
.release = sock_close,
|
||||
.fasync = sock_fasync,
|
||||
.sendpage = sock_sendpage,
|
||||
|
@ -559,23 +557,6 @@ static struct socket *sock_alloc(void)
|
|||
return sock;
|
||||
}
|
||||
|
||||
/*
|
||||
* In theory you can't get an open on this inode, but /proc provides
|
||||
* a back door. Remember to keep it shut otherwise you'll let the
|
||||
* creepy crawlies in.
|
||||
*/
|
||||
|
||||
static int sock_no_open(struct inode *irrelevant, struct file *dontcare)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
const struct file_operations bad_sock_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = sock_no_open,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
/**
|
||||
* sock_release - close a socket
|
||||
* @sock: socket to close
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue