aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-01-12 16:59:34 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-12 20:03:43 -0500
commitc74a1cbb3cac348f276fabc381758f5b0b4713b2 (patch)
tree5b403590e41b5e91fce25c69d50a23b920b3497f /net
parentf772c4a6a320ec25d94ba951881474eeef1b7f48 (diff)
pass default dentry_operations to mount_pseudo()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/socket.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/net/socket.c b/net/socket.c
index ccc576a6a508..ac2219f90d5d 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -306,20 +306,6 @@ static const struct super_operations sockfs_ops = {
306 .statfs = simple_statfs, 306 .statfs = simple_statfs,
307}; 307};
308 308
309static struct dentry *sockfs_mount(struct file_system_type *fs_type,
310 int flags, const char *dev_name, void *data)
311{
312 return mount_pseudo(fs_type, "socket:", &sockfs_ops, SOCKFS_MAGIC);
313}
314
315static struct vfsmount *sock_mnt __read_mostly;
316
317static struct file_system_type sock_fs_type = {
318 .name = "sockfs",
319 .mount = sockfs_mount,
320 .kill_sb = kill_anon_super,
321};
322
323/* 309/*
324 * sockfs_dname() is called from d_path(). 310 * sockfs_dname() is called from d_path().
325 */ 311 */
@@ -333,6 +319,21 @@ static const struct dentry_operations sockfs_dentry_operations = {
333 .d_dname = sockfs_dname, 319 .d_dname = sockfs_dname,
334}; 320};
335 321
322static struct dentry *sockfs_mount(struct file_system_type *fs_type,
323 int flags, const char *dev_name, void *data)
324{
325 return mount_pseudo(fs_type, "socket:", &sockfs_ops,
326 &sockfs_dentry_operations, SOCKFS_MAGIC);
327}
328
329static struct vfsmount *sock_mnt __read_mostly;
330
331static struct file_system_type sock_fs_type = {
332 .name = "sockfs",
333 .mount = sockfs_mount,
334 .kill_sb = kill_anon_super,
335};
336
336/* 337/*
337 * Obtains the first available file descriptor and sets it up for use. 338 * Obtains the first available file descriptor and sets it up for use.
338 * 339 *
@@ -368,7 +369,6 @@ static int sock_alloc_file(struct socket *sock, struct file **f, int flags)
368 } 369 }
369 path.mnt = mntget(sock_mnt); 370 path.mnt = mntget(sock_mnt);
370 371
371 d_set_d_op(path.dentry, &sockfs_dentry_operations);
372 d_instantiate(path.dentry, SOCK_INODE(sock)); 372 d_instantiate(path.dentry, SOCK_INODE(sock));
373 SOCK_INODE(sock)->i_fop = &socket_file_ops; 373 SOCK_INODE(sock)->i_fop = &socket_file_ops;
374 374