net: dev: fix incorrect getting net device's name
authorGao feng <gaofeng@cn.fujitsu.com>
Thu, 13 Sep 2012 20:58:27 +0000 (20:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Sep 2012 19:37:01 +0000 (15:37 -0400)
When moving a nic from net namespace A to net namespace B,
in dev_change_net_namesapce,we call __dev_get_by_name to
decide if the netns B has the device has the same name.

if the netns B already has the same named device,we call
dev_get_valid_name to try to get a valid name for this nic in
the netns B,but net_device->nd_net still point to netns A now.

this patch fix it.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

diff --cc net/core/dev.c
Simple merge