Whamcloud - gitweb
LU-2446 build: Update Whamcloud copyright messages for Intel
[fs/lustre-release.git] / libcfs / libcfs / linux / linux-proc.c
index 99dcb32..684423b 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -40,9 +40,6 @@
  * Author: Phil Schwan <phil@clusterfs.com>
  */
 
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
@@ -53,7 +50,6 @@
 #include <net/sock.h>
 #include <linux/uio.h>
 
-#include <asm/system.h>
 #include <asm/uaccess.h>
 
 #include <linux/fs.h>
@@ -179,8 +175,10 @@ static int __proc_dobitmasks(void *data, int write,
                 }
         } else {
                 rc = cfs_trace_copyin_string(tmpstr, tmpstrlen, buffer, nob);
-                if (rc < 0)
-                        return rc;
+               if (rc < 0) {
+                       cfs_trace_free_string_buffer(tmpstr, tmpstrlen);
+                       return rc;
+               }
 
                 rc = libcfs_debug_str2mask(mask, tmpstr, is_subsys);
                 /* Always print LBUG/LASSERT to console, so keep this mask */