mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 09:34:17 +00:00
sock_close() couldn't have been called with NULL inode since at least 2.1.early
... if not since 0.99 or so. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e53cfda5d2
commit
0e2bcaae83
@ -1173,15 +1173,6 @@ static int sock_mmap(struct file *file, struct vm_area_struct *vma)
|
|||||||
|
|
||||||
static int sock_close(struct inode *inode, struct file *filp)
|
static int sock_close(struct inode *inode, struct file *filp)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* It was possible the inode is NULL we were
|
|
||||||
* closing an unfinished socket.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!inode) {
|
|
||||||
printk(KERN_DEBUG "sock_close: NULL inode\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
sock_release(SOCKET_I(inode));
|
sock_release(SOCKET_I(inode));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user