Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150748
b: refs/heads/master
c: f0a4d0e
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Jun 8, 2009
1 parent aea4e88 commit 0ca68b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef681ce1e8b3e63317cd724c200b2fd39286c005
refs/heads/master: f0a4d0e5b5bfd271e6737f7c095994835b70d450
7 changes: 4 additions & 3 deletions trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,21 +1322,22 @@ static int tun_chr_open(struct inode *inode, struct file * file)
static int tun_chr_close(struct inode *inode, struct file *file)
{
struct tun_file *tfile = file->private_data;
struct tun_struct *tun = __tun_get(tfile);
struct tun_struct *tun;


rtnl_lock();
tun = __tun_get(tfile);
if (tun) {
DBG(KERN_INFO "%s: tun_chr_close\n", tun->dev->name);

rtnl_lock();
__tun_detach(tun);

/* If desireable, unregister the netdevice. */
if (!(tun->flags & TUN_PERSIST))
unregister_netdevice(tun->dev);

rtnl_unlock();
}
rtnl_unlock();

tun = tfile->tun;
if (tun)
Expand Down

0 comments on commit 0ca68b5

Please sign in to comment.