Message ID | 20210109172624.2028156-5-olteanv@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v6,net-next,01/15] net: mark dev_base_lock for deprecation | expand |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index daf502c13d6d..8604183678fc 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -585,14 +585,13 @@ static ssize_t netstat_show(const struct device *d, WARN_ON(offset > sizeof(struct rtnl_link_stats64) || offset % sizeof(u64) != 0); - read_lock(&dev_base_lock); if (dev_isalive(dev)) { struct rtnl_link_stats64 temp; const struct rtnl_link_stats64 *stats = dev_get_stats(dev, &temp); ret = sprintf(buf, fmt_u64, *(u64 *)(((u8 *)stats) + offset)); } - read_unlock(&dev_base_lock); + return ret; }