Message ID | 20210105185902.3922928-5-olteanv@gmail.com |
---|---|
State | New |
Headers | show |
Series | [RFC,v2,net-next,01/12] net: mark dev_base_lock for deprecation | expand |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 999b70c59761..0782a476b424 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; }