Commit bd71ea60 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: devlink: Remove overzealous WARN_ON with snapshots

It is possible to trigger this WARN_ON from user space by triggering a
devlink snapshot with an ID which already exists. We don't need both
-EEXISTS being reported and spamming the kernel log.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarChris Healy <cphealy@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c5301899
......@@ -4063,7 +4063,7 @@ static int __devlink_snapshot_id_insert(struct devlink *devlink, u32 id)
{
lockdep_assert_held(&devlink->lock);
if (WARN_ON(xa_load(&devlink->snapshot_ids, id)))
if (xa_load(&devlink->snapshot_ids, id))
return -EEXIST;
return xa_err(xa_store(&devlink->snapshot_ids, id, xa_mk_value(0),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment