net: filter: rename sk_filter_proglen -> bpf_classic_proglen
authorAlexei Starovoitov <ast@plumgrid.com>
Thu, 31 Jul 2014 03:34:13 +0000 (20:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Aug 2014 22:02:38 +0000 (15:02 -0700)
trivial rename to better match semantics of macro

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/filter.h
net/core/filter.c
net/core/sock_diag.c

index 00640edc166f1caddb9fa1efdd80d04a931ef527..3769341a745ddabfd4d2d19bbc6ac631648d23b6 100644 (file)
@@ -344,8 +344,7 @@ static inline unsigned int sk_filter_size(unsigned int proglen)
                   offsetof(struct sk_filter, insns[proglen]));
 }
 
-#define sk_filter_proglen(fprog)                       \
-               (fprog->len * sizeof(fprog->filter[0]))
+#define bpf_classic_proglen(fprog) (fprog->len * sizeof(fprog->filter[0]))
 
 int sk_filter(struct sock *sk, struct sk_buff *skb);
 
index 5a6aeb1d40b8a27db60b147d7956f72c5409d194..d6cb287e4f59fc8b288e9ab28ea86c2ccc612e63 100644 (file)
@@ -813,7 +813,7 @@ EXPORT_SYMBOL(sk_chk_filter);
 static int sk_store_orig_filter(struct sk_filter *fp,
                                const struct sock_fprog *fprog)
 {
-       unsigned int fsize = sk_filter_proglen(fprog);
+       unsigned int fsize = bpf_classic_proglen(fprog);
        struct sock_fprog_kern *fkprog;
 
        fp->orig_prog = kmalloc(sizeof(*fkprog), GFP_KERNEL);
@@ -1001,7 +1001,7 @@ static struct sk_filter *__sk_prepare_filter(struct sk_filter *fp)
 int sk_unattached_filter_create(struct sk_filter **pfp,
                                struct sock_fprog_kern *fprog)
 {
-       unsigned int fsize = sk_filter_proglen(fprog);
+       unsigned int fsize = bpf_classic_proglen(fprog);
        struct sk_filter *fp;
 
        /* Make sure new filter is there and in the right amounts. */
@@ -1053,7 +1053,7 @@ EXPORT_SYMBOL_GPL(sk_unattached_filter_destroy);
 int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
 {
        struct sk_filter *fp, *old_fp;
-       unsigned int fsize = sk_filter_proglen(fprog);
+       unsigned int fsize = bpf_classic_proglen(fprog);
        unsigned int sk_fsize = sk_filter_size(fprog->len);
        int err;
 
@@ -1154,7 +1154,7 @@ int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf,
                goto out;
 
        ret = -EFAULT;
-       if (copy_to_user(ubuf, fprog->filter, sk_filter_proglen(fprog)))
+       if (copy_to_user(ubuf, fprog->filter, bpf_classic_proglen(fprog)))
                goto out;
 
        /* Instead of bytes, the API requests to return the number
index a4216a4c95720f105b0cd7841cd59e84d3dda7a6..57d922320c59c782e034cac5180438e50c9ba5e4 100644 (file)
@@ -69,7 +69,7 @@ int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk,
                goto out;
 
        fprog = filter->orig_prog;
-       flen = sk_filter_proglen(fprog);
+       flen = bpf_classic_proglen(fprog);
 
        attr = nla_reserve(skb, attrtype, flen);
        if (attr == NULL) {