aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2019-02-28 13:13:26 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2019-04-08 22:56:14 +0200
commit3b15d09f7e6db44065aaba5fd16dc7420035c5ad (patch)
treea0c490bd2ca02e475ab4b92dc7e86092a6e0d758 /net/netfilter
parentcxgb4: Don't return EAGAIN when TCAM is full. (diff)
downloadlinux-dev-3b15d09f7e6db44065aaba5fd16dc7420035c5ad.tar.xz
linux-dev-3b15d09f7e6db44065aaba5fd16dc7420035c5ad.zip
time: Introduce jiffies64_to_msecs()
there is a similar helper in net/netfilter/nf_tables_api.c, this maybe become a common request someday, so move it to time.c Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Signed-off-by: Li RongQing <lirongqing@baidu.com> Acked-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_tables_api.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 90e6b09ef2af..ee1b0d1445aa 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -3193,9 +3193,7 @@ static int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result)
static __be64 nf_jiffies64_to_msecs(u64 input)
{
- u64 ms = jiffies64_to_nsecs(input);
-
- return cpu_to_be64(div_u64(ms, NSEC_PER_MSEC));
+ return cpu_to_be64(jiffies64_to_msecs(input));
}
static int nf_tables_fill_set(struct sk_buff *skb, const struct nft_ctx *ctx,