Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / utils / mount_lustre.c
index 79e89e6..c0905bc 100644 (file)
@@ -206,6 +206,7 @@ static const struct opt_map opt_map[] = {
   { "nouser",   1, 0         },      /* Forbid ordinary user to mount */
   { "noowner",  1, 0         },      /* Device owner has no special privs */
   { "_netdev",  0, 0         },      /* Device accessible only via network */
+  { "loop",     0, 0         },
   { NULL,       0, 0         }
 };
 /****************************************************************************/
@@ -389,7 +390,8 @@ int set_tunables(char *source, int src_len)
                 if (verbose)
                         fprintf(stderr,"warning: device %s does not match any "
                                 "entry under /sys/block\n", real_path);
-                return -EINVAL;
+                rc = -EINVAL;
+                goto out;
         }
 
         snprintf(path, sizeof(path), "%s/%s", glob_info.gl_pathv[i],
@@ -399,7 +401,7 @@ int set_tunables(char *source, int src_len)
                 if (verbose)
                         fprintf(stderr, "warning: opening %s: %s\n",
                                 path, strerror(errno));
-                return rc;
+                goto out;
         }
 
         if (strlen(buf) - 1 > 0) {
@@ -410,6 +412,9 @@ int set_tunables(char *source, int src_len)
                         fprintf(stderr, "warning: writing to %s: %s\n",
                                 path, strerror(errno));
         }
+
+out:
+        globfree(&glob_info);
         return rc;
 }