Whamcloud - gitweb
LU-8378 obd: move s3 in lmd_parse to inner loop
[fs/lustre-release.git] / lustre / obdclass / obd_mount.c
index 96eefa8..ab7b6ba 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -1158,7 +1158,7 @@ static int lmd_parse_nidlist(char *buf, char **endh)
  */
 static int lmd_parse(char *options, struct lustre_mount_data *lmd)
 {
-       char *s1, *s2, *s3, *devname = NULL;
+       char *s1, *s2, *devname = NULL;
        struct lustre_mount_data *raw = (struct lustre_mount_data *)options;
        int rc = 0;
        ENTRY;
@@ -1190,6 +1190,7 @@ static int lmd_parse(char *options, struct lustre_mount_data *lmd)
        while (*s1) {
                int clear = 0;
                int time_min = OBD_RECOVERY_TIME_MIN;
+               char *s3;
 
                /* Skip whitespace and extra commas */
                while (*s1 == ' ' || *s1 == ',')
@@ -1522,7 +1523,9 @@ EXPORT_SYMBOL(lustre_register_kill_super_cb);
 static struct dentry *lustre_mount(struct file_system_type *fs_type, int flags,
                                   const char *devname, void *data)
 {
-       struct lustre_mount_data2 lmd2 = { data, NULL };
+       struct lustre_mount_data2 lmd2 = {
+               .lmd2_data = data,
+       };
 
        return mount_nodev(fs_type, flags, &lmd2, lustre_fill_super);
 }
@@ -1530,7 +1533,10 @@ static struct dentry *lustre_mount(struct file_system_type *fs_type, int flags,
 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 = { data, mnt };
+       struct lustre_mount_data2 lmd2 = {
+               .lmd2_data = data,
+               .lmd2_mnt = mnt,
+       };
 
        return get_sb_nodev(fs_type, flags, &lmd2, lustre_fill_super, mnt);
 }