Whamcloud - gitweb
LU-9859 libcfs: make lnet_debugfs_symlink_def local to libcfs/modules.c
[fs/lustre-release.git] / libcfs / libcfs / module.c
index 549a98c..0554cc9 100644 (file)
 #include <libcfs/crypto/llcrypt.h>
 #include "tracefile.h"
 
+struct lnet_debugfs_symlink_def {
+       const char *name;
+       const char *target;
+};
+
 static struct dentry *lnet_debugfs_root;
 
 BLOCKING_NOTIFIER_HEAD(libcfs_ioctl_list);
@@ -307,8 +312,8 @@ static int __proc_dobitmasks(void *data, int write,
                }
        } else {
                tmpstr = memdup_user_nul(buffer, nob);
-               if (!tmpstr)
-                       return -ENOMEM;
+               if (IS_ERR(tmpstr))
+                       return PTR_ERR(tmpstr);
 
                rc = libcfs_debug_str2mask(mask, strim(tmpstr), is_subsys);
                /* Always print LBUG/LASSERT to console, so keep this mask */