201e32769dce92a33d493d166770ca289e2bb51e
[feed/routing.git] / batman-adv / patches / 0001-Revert-batman-adv-convert-stream-like-files-from-non.patch
1 From: Sven Eckelmann <sven@narfation.org>
2 Date: Thu, 23 May 2019 19:26:27 +0200
3 Subject: Revert "batman-adv: convert stream-like files from nonseekable_open -> stream_open"
4
5 OpenWrt's mac80211 package is not yet ready to support the generic netlink
6 API of Linux 5.2.
7
8 This reverts commit 337ae19a00d4455cf84afa58abfb432f78c882b9.
9
10 diff --git a/compat-include/linux/fs.h b/compat-include/linux/fs.h
11 index 480722f04ba7ddefc837d5e55a340271e0814b14..c52e0e8e87584d106ab64ef2c522e6ac1ff6e796 100644
12 --- a/compat-include/linux/fs.h
13 +++ b/compat-include/linux/fs.h
14 @@ -31,15 +31,4 @@ static inline struct dentry *batadv_file_dentry(const struct file *file)
15
16 #endif /* < KERNEL_VERSION(4, 6, 0) */
17
18 -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
19 -
20 -static inline int batadv_stream_open(struct inode *inode, struct file *filp)
21 -{
22 - return nonseekable_open(inode, filp);
23 -}
24 -
25 -#define stream_open batadv_stream_open
26 -
27 -#endif /* < KERNEL_VERSION(5, 2, 0) */
28 -
29 #endif /* _NET_BATMAN_ADV_COMPAT_LINUX_FS_H_ */
30 diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c
31 index 0a91c8661357d4ddbea1ba20dcd0df67b8ba5a97..de81b5ecad91afd8d684edbf781c70a3bae38c60 100644
32 --- a/net/batman-adv/icmp_socket.c
33 +++ b/net/batman-adv/icmp_socket.c
34 @@ -65,7 +65,7 @@ static int batadv_socket_open(struct inode *inode, struct file *file)
35
36 batadv_debugfs_deprecated(file, "");
37
38 - stream_open(inode, file);
39 + nonseekable_open(inode, file);
40
41 socket_client = kmalloc(sizeof(*socket_client), GFP_KERNEL);
42 if (!socket_client) {
43 diff --git a/net/batman-adv/log.c b/net/batman-adv/log.c
44 index f79ebd5b46e95b3b6de717c7ea1ecf44e5c96051..60ce11e16a905e790424a2d7aca81c1f945c1ec2 100644
45 --- a/net/batman-adv/log.c
46 +++ b/net/batman-adv/log.c
47 @@ -90,7 +90,7 @@ static int batadv_log_open(struct inode *inode, struct file *file)
48 batadv_debugfs_deprecated(file,
49 "Use tracepoint batadv:batadv_dbg instead\n");
50
51 - stream_open(inode, file);
52 + nonseekable_open(inode, file);
53 file->private_data = inode->i_private;
54 return 0;
55 }