This is used to pass a void* and NULL to lustre_fill_super().
It is easier just to pass the void*. The "NULL" passed is
sometimes a "struct vfsmount". This pointer is passed to
ll_fill_super() which then passes it to client_common_fill_super()
that just ignores it.
Linux-commit:
998831a00192a38a9f1425b2fb2d6faf3e34e665
Change-Id: If5e229d80c08b7c16e89d11a03fc766584c24f7c
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/35426
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
-struct lustre_mount_data2 {
- void *lmd2_data;
- struct vfsmount *lmd2_mnt;
-};
-
/**
* This is the entry point for the mount call into Lustre.
* This is called when a server or client is mounted,
* and this is where we start setting things up.
* @param data Mount options (e.g. -o flock,abort_recov)
*/
/**
* This is the entry point for the mount call into Lustre.
* This is called when a server or client is mounted,
* and this is where we start setting things up.
* @param data Mount options (e.g. -o flock,abort_recov)
*/
-static int lustre_fill_super(struct super_block *sb, void *data, int silent)
+static int lustre_fill_super(struct super_block *sb, void *lmd2_data,
+ int silent)
{
struct lustre_mount_data *lmd;
{
struct lustre_mount_data *lmd;
- struct lustre_mount_data2 *lmd2 = data;
struct lustre_sb_info *lsi;
int rc;
struct lustre_sb_info *lsi;
int rc;
obd_zombie_barrier();
/* Figure out the lmd from the mount options */
obd_zombie_barrier();
/* Figure out the lmd from the mount options */
- if (lmd_parse((char *)(lmd2->lmd2_data), lmd)) {
+ if (lmd_parse(lmd2_data, lmd)) {
lustre_put_lsi(sb);
GOTO(out, rc = -EINVAL);
}
lustre_put_lsi(sb);
GOTO(out, rc = -EINVAL);
}
}
/* Connect and start */
/* (should always be ll_fill_super) */
}
/* Connect and start */
/* (should always be ll_fill_super) */
- rc = (*client_fill_super)(sb, lmd2->lmd2_mnt);
+ rc = (*client_fill_super)(sb, NULL);
/* c_f_s will call lustre_common_put_super on failure */
}
} else {
/* c_f_s will call lustre_common_put_super on failure */
}
} else {
static struct dentry *lustre_mount(struct file_system_type *fs_type, int flags,
const char *devname, void *data)
{
static struct dentry *lustre_mount(struct file_system_type *fs_type, int flags,
const char *devname, void *data)
{
- struct lustre_mount_data2 lmd2 = {
- .lmd2_data = data,
- };
-
- return mount_nodev(fs_type, flags, &lmd2, lustre_fill_super);
+ return mount_nodev(fs_type, flags, data, lustre_fill_super);
}
#else
static int lustre_get_sb(struct file_system_type *fs_type, int flags,
const char *devname, void *data, struct vfsmount *mnt)
{
}
#else
static int lustre_get_sb(struct file_system_type *fs_type, int flags,
const char *devname, void *data, struct vfsmount *mnt)
{
- struct lustre_mount_data2 lmd2 = {
- .lmd2_data = data,
- .lmd2_mnt = mnt,
- };
-
- return get_sb_nodev(fs_type, flags, &lmd2, lustre_fill_super, mnt);
+ return get_sb_nodev(fs_type, flags, data, lustre_fill_super, mnt);