提交 219e6963 编写于 作者: D David Howells 提交者: 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: NDavid Howells <dhowells@redhat.com>
Acked-by: NMatthew 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: NAl Viro <viro@zeniv.linux.org.uk>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册