Whamcloud - gitweb
LU-6210 utils: Change positional struct initializers to C99
[fs/lustre-release.git] / lustre / utils / mount_utils.c
index ec353f1..2027b28 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -619,7 +619,7 @@ void unload_backfs_module(struct module_backfs_ops *ops)
 /* Return true if backfs_ops has operations for the given mount_type. */
 int backfs_mount_type_okay(enum ldd_mount_type mount_type)
 {
-       if (unlikely(mount_type >= LDD_MT_LAST || mount_type < 0)) {
+       if (mount_type >= LDD_MT_LAST || mount_type < 0) {
                fatal();
                fprintf(stderr, "fs type out of range %d\n", mount_type);
                return 0;
@@ -884,18 +884,8 @@ int load_shared_keys(struct mount_opts *mop)
        struct stat sbuf;
        char fullpath[PATH_MAX];
        char *path = mop->mo_skpath;
-       int type = 0;
        int rc;
 
-       if (IS_SERVER(&mop->mo_ldd)) {
-               if (IS_MGS(&mop->mo_ldd))
-                       type |= SK_TYPE_MGS;
-               if (IS_MDT(&mop->mo_ldd) || IS_OST(&mop->mo_ldd))
-                       type |= SK_TYPE_SERVER | SK_TYPE_CLIENT;
-       } else {
-               type |= SK_TYPE_CLIENT;
-       }
-
        /* init logging */
        sk_init_logging(NULL, 1, 1);
 
@@ -908,7 +898,7 @@ int load_shared_keys(struct mount_opts *mop)
 
        /* Load individual keys or a directory of them */
        if (S_ISREG(sbuf.st_mode)) {
-               return sk_load_keyfile(path, type);
+               return sk_load_keyfile(path);
        } else if (!S_ISDIR(sbuf.st_mode)) {
                fprintf(stderr, "Invalid shared key path: %s\n", path);
                return -ENOKEY;
@@ -951,7 +941,7 @@ int load_shared_keys(struct mount_opts *mop)
                if (!S_ISREG(sbuf.st_mode))
                        continue;
 
-               rc = sk_load_keyfile(fullpath, type);
+               rc = sk_load_keyfile(fullpath);
                if (rc) {
                        fprintf(stderr, "Failed to load key %s\n", fullpath);
                }