[PATCH] tty: cleanup release_mem
authorChristoph Hellwig <hch@lst.de>
Sat, 10 Feb 2007 09:46:46 +0000 (01:46 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 19:18:07 +0000 (11:18 -0800)
commitd5698c28b6e4711e4747bf155f69936208d60e28
treef11e7a8892a4ff218dc9a9789dbb77754ccb61f6
parent4b98d11b40f03382918796f3c5c936d5495d20a4
[PATCH] tty: cleanup release_mem

release_mem contains two copies of exactly the same code.  Refactor these
into a new helper, release_tty.  The only change in behaviour is that the
driver reference count is now decremented after the master tty has been
freed instead of before.

[penberg@cs.helsinki.fi: fix use-after-free in release_tty.]
Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/tty_io.c