]> git.baikalelectronics.ru Git - kernel.git/commit
switchdev: respect SKIP_EOPNOTSUPP flag in case there is no recursion
authorJiri Pirko <jiri@mellanox.com>
Tue, 3 Nov 2015 16:40:53 +0000 (17:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Nov 2015 18:39:21 +0000 (13:39 -0500)
commitdd82a9b4d5fe313dcaf670c22741dd7066de2855
treed9fc65ba40a8d6e3c444a29dab3ef37ad6c99c4a
parent6f565d0263bab8276135f599f1c583b489ac8fc7
switchdev: respect SKIP_EOPNOTSUPP flag in case there is no recursion

Caller passing down the SKIP_EOPNOTSUPP switchdev flag expects that
-EOPNOTSUPP cannot be returned. But in case of direct op call without
recurtion, this may happen. So fix this by checking it always on the
end of __switchdev_port_attr_set function.

Fixes: 90c3536adb87 ("switchdev: skip over ports returning -EOPNOTSUPP when recursing ports")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/switchdev/switchdev.c