Commit 219e6963 authored by David Howells's avatar David Howells Committed by Al Viro

vfs: Convert ocxlflash to use the new mount API

Convert the ocxlflash filesystem to the new internal mount API as the old
one will be obsoleted and removed.  This allows greater flexibility in
communication of mount parameters between userspace, the VFS and the
filesystem.

See Documentation/filesystems/mount_api.txt for more information.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Acked-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
cc: "Manoj N. Kumar" <manoj@linux.ibm.com>
cc: Uma Krishnan <ukrishn@linux.ibm.com>
cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
cc: "Martin K. Petersen" <martin.petersen@oracle.com>
cc: linux-scsi@vger.kernel.org
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 52418c8f
......@@ -16,6 +16,7 @@
#include <linux/idr.h>
#include <linux/module.h>
#include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <linux/poll.h>
#include <linux/sched/signal.h>
......@@ -35,26 +36,15 @@
static int ocxlflash_fs_cnt;
static struct vfsmount *ocxlflash_vfs_mount;
/*
* ocxlflash_fs_mount() - mount the pseudo-filesystem
* @fs_type: File system type.
* @flags: Flags for the filesystem.
* @dev_name: Device name associated with the filesystem.
* @data: Data pointer.
*
* Return: pointer to the directory entry structure
*/
static struct dentry *ocxlflash_fs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data)
static int ocxlflash_fs_init_fs_context(struct fs_context *fc)
{
return mount_pseudo(fs_type, NULL, NULL, OCXLFLASH_FS_MAGIC);
return init_pseudo(fc, OCXLFLASH_FS_MAGIC) ? 0 : -ENOMEM;
}
static struct file_system_type ocxlflash_fs_type = {
.name = "ocxlflash",
.owner = THIS_MODULE,
.mount = ocxlflash_fs_mount,
.init_fs_context = ocxlflash_fs_init_fs_context,
.kill_sb = kill_anon_super,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment