mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-30 08:04:13 +08:00
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: David Howells <dhowells@redhat.com> Acked-by: Matthew 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: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
52418c8f00
commit
219e696390
@ -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,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user