The parsing of mount parameters from the config llog is done in
some cases with simple_strto* which is considered obsolete.
Replace simple_strto* with the kstrto* equivalent functions.
Change-Id: I7c26d14d02828c9f9a96f31a086a65bb39f3ea87
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/40119
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
const char *name = lustre_cfg_string(cfg, 0);
const char *dev = lustre_cfg_string(cfg, 1);
const char *opts;
const char *name = lustre_cfg_string(cfg, 0);
const char *dev = lustre_cfg_string(cfg, 1);
const char *opts;
- unsigned long page, s_flags, lmd_flags = 0;
+ unsigned long page, s_flags = 0, lmd_flags = 0;
struct page *__page;
struct file_system_type *type;
char *options = NULL;
struct page *__page;
struct file_system_type *type;
char *options = NULL;
struct osd_thread_info *info = osd_oti_get(env);
struct lu_fid *fid = &info->oti_fid;
struct inode *inode;
struct osd_thread_info *info = osd_oti_get(env);
struct lu_fid *fid = &info->oti_fid;
struct inode *inode;
RETURN(-E2BIG);
strcpy(o->od_mntdev, dev);
RETURN(-E2BIG);
strcpy(o->od_mntdev, dev);
- str = lustre_cfg_string(cfg, 2);
- s_flags = simple_strtoul(str, NULL, 0);
- str = strstr(str, ":");
- if (str)
- lmd_flags = simple_strtoul(str + 1, NULL, 0);
+ str = lustre_cfg_buf(cfg, 2);
+ sscanf(str, "%lu:%lu", &s_flags, &lmd_flags);
+
opts = lustre_cfg_string(cfg, 3);
#ifdef __BIG_ENDIAN
if (opts == NULL || strstr(opts, "bigendian_extents") == NULL) {
opts = lustre_cfg_string(cfg, 3);
#ifdef __BIG_ENDIAN
if (opts == NULL || strstr(opts, "bigendian_extents") == NULL) {