From fd50d435119f0993ee05a4653315e1a55627817b Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 27 Mar 2020 02:08:26 -0600 Subject: [PATCH] LU-11986 libcfs: provide QSTR_INIT compat macro 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 Change-Id: Ice19a4dad8456551ba398034a8d3942068006512 Reviewed-on: https://review.whamcloud.com/38090 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Serguei Smirnov Reviewed-by: Oleg Drokin --- libcfs/include/libcfs/linux/linux-fs.h | 4 ++++ libcfs/libcfs/module.c | 1 + 2 files changed, 5 insertions(+) diff --git a/libcfs/include/libcfs/linux/linux-fs.h b/libcfs/include/libcfs/linux/linux-fs.h index 32ef1e0..ce36011 100644 --- a/libcfs/include/libcfs/linux/linux-fs.h +++ b/libcfs/include/libcfs/linux/linux-fs.h @@ -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) diff --git a/libcfs/libcfs/module.c b/libcfs/libcfs/module.c index 882b177..44e949e 100644 --- a/libcfs/libcfs/module.c +++ b/libcfs/libcfs/module.c @@ -53,6 +53,7 @@ #include #include +#include #include #include "tracefile.h" -- 1.8.3.1