Whamcloud - gitweb
LU-11986 libcfs: provide QSTR_INIT compat macro 90/38090/2
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 27 Mar 2020 08:08:26 +0000 (02:08 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 6 Apr 2020 21:17:09 +0000 (21:17 +0000)
Provide a compat macro for QSTR_INIT() for older kernels.

Fixes: 9d42660e173e ("LU-11986 lnet: properly cleanup lnet debugfs files")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ice19a4dad8456551ba398034a8d3942068006512
Reviewed-on: https://review.whamcloud.com/38090
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/linux/linux-fs.h
libcfs/libcfs/module.c

index 32ef1e0..ce36011 100644 (file)
@@ -50,6 +50,10 @@ static inline struct dentry *file_dentry(const struct file *file)
 }
 #endif
 
+#ifndef QSTR_INIT
+#define QSTR_INIT(n, l) { .len = l, .name = n }
+#endif
+
 #if defined(HAVE_FILE_FSYNC_4ARGS) || defined(HAVE_FILE_FSYNC_2ARGS)
 #define ll_vfs_fsync_range(fp, start, end, datasync) \
        vfs_fsync_range(fp, start, end, datasync)
index 882b177..44e949e 100644 (file)
@@ -53,6 +53,7 @@
 
 #include <libcfs/libcfs.h>
 #include <libcfs/libcfs_crypto.h>
+#include <libcfs/linux/linux-fs.h>
 #include <lnet/lib-lnet.h>
 #include "tracefile.h"