Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-1884 build: fix 'resource leak' errors
[fs/lustre-release.git]
/
libcfs
/
libcfs
/
linux
/
linux-proc.c
diff --git
a/libcfs/libcfs/linux/linux-proc.c
b/libcfs/libcfs/linux/linux-proc.c
index
e82b675
..
b093d12
100644
(file)
--- a/
libcfs/libcfs/linux/linux-proc.c
+++ b/
libcfs/libcfs/linux/linux-proc.c
@@
-40,20
+40,12
@@
* Author: Phil Schwan <phil@clusterfs.com>
*/
* Author: Phil Schwan <phil@clusterfs.com>
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/stat.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/stat.h>
#include <linux/errno.h>
-#include <linux/smp_lock.h>
#include <linux/unistd.h>
#include <net/sock.h>
#include <linux/uio.h>
#include <linux/unistd.h>
#include <net/sock.h>
#include <linux/uio.h>
@@
-184,8
+176,10
@@
static int __proc_dobitmasks(void *data, int write,
}
} else {
rc = cfs_trace_copyin_string(tmpstr, tmpstrlen, buffer, nob);
}
} 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 */
rc = libcfs_debug_str2mask(mask, tmpstr, is_subsys);
/* Always print LBUG/LASSERT to console, so keep this mask */
@@
-469,7
+463,7
@@
static cfs_sysctl_table_t lnet_table[] = {
},
{
},
{
- .ctl_name = PSDEV_CPT_TABLE,
+ INIT_CTL_NAME(PSDEV_CPT_TABLE)
.procname = "cpu_partition_table",
.maxlen = 128,
.mode = 0444,
.procname = "cpu_partition_table",
.maxlen = 128,
.mode = 0444,