net: ipmr: remove unused MFC_NOTIFY flag and make the flags enum
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 26 Nov 2015 14:23:45 +0000 (15:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Nov 2015 20:26:22 +0000 (15:26 -0500)
MFC_NOTIFY was introduced in kernel 2.1.68 but afaik it hasn't been used
and I couldn't find any users currently so just remove it. Only
MFC_STATIC is left, so move it into an enum, add a description and use
BIT().

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mroute.h
net/ipv4/ipmr.c

index 79aaa9fc1a15d6ed7caac2b147ae030b18da060a..fa66ebc1fed653d845ff27e85829b219cc61f760 100644 (file)
@@ -64,6 +64,13 @@ struct vif_device {
 
 #define VIFF_STATIC 0x8000
 
+/* mfc_flags:
+ * MFC_STATIC - the entry was added statically (not by a routing daemon)
+ */
+enum {
+       MFC_STATIC = BIT(0),
+};
+
 struct mfc_cache {
        struct list_head list;
        __be32 mfc_mcastgrp;                    /* Group the entry belongs to   */
@@ -89,9 +96,6 @@ struct mfc_cache {
        struct rcu_head rcu;
 };
 
-#define MFC_STATIC             1
-#define MFC_NOTIFY             2
-
 #define MFC_LINES              64
 
 #ifdef __BIG_ENDIAN
index a2d248d9c35c872e332b868a1f3ad46b2a2fddd8..a74e61883b8fa8d0c9875c2ac4a53845b7ff573d 100644 (file)
@@ -2199,8 +2199,6 @@ int ipmr_get_route(struct net *net, struct sk_buff *skb,
        }
 
        read_lock(&mrt_lock);
-       if (!nowait && (rtm->rtm_flags & RTM_F_NOTIFY))
-               cache->mfc_flags |= MFC_NOTIFY;
        err = __ipmr_fill_mroute(mrt, skb, cache, rtm);
        read_unlock(&mrt_lock);
        rcu_read_unlock();