Whamcloud - gitweb
LU-7543 obd: reserve connection flag OBD_CONNECT_SUBTREE
[fs/lustre-release.git] / lustre / obdclass / lprocfs_status.c
index 3b878f6..a9e4477 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2015, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -652,6 +652,8 @@ static const char *obd_connect_names[] = {
        "unlink_close",
        "multi_mod_rpcs",
        "dir_stripe",
+       "fileset_mount",
+       "bulk_mbits",
        "unknown",
        NULL
 };
@@ -1062,6 +1064,7 @@ int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, unsigned int cpuid)
        }
        return rc;
 }
+EXPORT_SYMBOL(lprocfs_stats_alloc_one);
 
 struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num,
                                           enum lprocfs_stats_flags flags)
@@ -1922,6 +1925,7 @@ int lprocfs_wr_nosquash_nids(const char __user *buffer, unsigned long count,
        char *kernbuf = NULL;
        char *errmsg;
        struct list_head tmp;
+       int len = count;
        ENTRY;
 
        if (count > 4096) {
@@ -1941,9 +1945,10 @@ int lprocfs_wr_nosquash_nids(const char __user *buffer, unsigned long count,
        kernbuf[count] = '\0';
 
        if (count > 0 && kernbuf[count - 1] == '\n')
-               kernbuf[count - 1] = '\0';
+               len = count - 1;
 
-       if (strcmp(kernbuf, "NONE") == 0 || strcmp(kernbuf, "clear") == 0) {
+       if ((len == 4 && strncmp(kernbuf, "NONE", len) == 0) ||
+           (len == 5 && strncmp(kernbuf, "clear", len) == 0)) {
                /* empty string is special case */
                down_write(&squash->rsi_sem);
                if (!list_empty(&squash->rsi_nosquash_nids))