]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - net/socket.c
Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[zynq/linux.git] / net / socket.c
index 293d56836f01cd3052ec6b00dc39ce03f085ec73..6a9ab7a8b1d2c5059752a9147c2f0fd1aea4f44d 100644 (file)
@@ -73,6 +73,7 @@
 #include <linux/module.h>
 #include <linux/highmem.h>
 #include <linux/mount.h>
+#include <linux/pseudo_fs.h>
 #include <linux/security.h>
 #include <linux/syscalls.h>
 #include <linux/compat.h>
@@ -338,19 +339,22 @@ static const struct xattr_handler *sockfs_xattr_handlers[] = {
        NULL
 };
 
-static struct dentry *sockfs_mount(struct file_system_type *fs_type,
-                        int flags, const char *dev_name, void *data)
+static int sockfs_init_fs_context(struct fs_context *fc)
 {
-       return mount_pseudo_xattr(fs_type, "socket:", &sockfs_ops,
-                                 sockfs_xattr_handlers,
-                                 &sockfs_dentry_operations, SOCKFS_MAGIC);
+       struct pseudo_fs_context *ctx = init_pseudo(fc, SOCKFS_MAGIC);
+       if (!ctx)
+               return -ENOMEM;
+       ctx->ops = &sockfs_ops;
+       ctx->dops = &sockfs_dentry_operations;
+       ctx->xattr = sockfs_xattr_handlers;
+       return 0;
 }
 
 static struct vfsmount *sock_mnt __read_mostly;
 
 static struct file_system_type sock_fs_type = {
        .name =         "sockfs",
-       .mount =        sockfs_mount,
+       .init_fs_context = sockfs_init_fs_context,
        .kill_sb =      kill_anon_super,
 };