mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
epoll: move kfree inside ep_free
Move the kfree() call inside the ep_free() function. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
67647d0fb8
commit
f0ee9aabb0
1 changed files with 2 additions and 5 deletions
|
@ -469,18 +469,16 @@ static void ep_free(struct eventpoll *ep)
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&epmutex);
|
mutex_unlock(&epmutex);
|
||||||
|
|
||||||
mutex_destroy(&ep->mtx);
|
mutex_destroy(&ep->mtx);
|
||||||
|
kfree(ep);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ep_eventpoll_release(struct inode *inode, struct file *file)
|
static int ep_eventpoll_release(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct eventpoll *ep = file->private_data;
|
struct eventpoll *ep = file->private_data;
|
||||||
|
|
||||||
if (ep) {
|
if (ep)
|
||||||
ep_free(ep);
|
ep_free(ep);
|
||||||
kfree(ep);
|
|
||||||
}
|
|
||||||
|
|
||||||
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: close() ep=%p\n", current, ep));
|
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: close() ep=%p\n", current, ep));
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1107,7 +1105,6 @@ asmlinkage long sys_epoll_create(int size)
|
||||||
|
|
||||||
error_free:
|
error_free:
|
||||||
ep_free(ep);
|
ep_free(ep);
|
||||||
kfree(ep);
|
|
||||||
error_return:
|
error_return:
|
||||||
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n",
|
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n",
|
||||||
current, size, error));
|
current, size, error));
|
||||||
|
|
Loading…
Reference in a new issue