projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38583f0
)
fs/file.c: don't open-code kvfree()
author
Al Viro
<viro@zeniv.linux.org.uk>
Wed, 23 Apr 2014 14:18:46 +0000
(10:18 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 6 May 2014 21:31:10 +0000
(17:31 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/file.c
patch
|
blob
|
history
diff --git
a/fs/file.c
b/fs/file.c
index 8f294cfac69749024c2c2e19d4b156755130e9ed..66923fe3176e49b03617e2f5477bb8e05fc89dc3 100644
(file)
--- a/
fs/file.c
+++ b/
fs/file.c
@@
-44,15
+44,10
@@
static void *alloc_fdmem(size_t size)
return vmalloc(size);
}
-static void free_fdmem(void *ptr)
-{
- is_vmalloc_addr(ptr) ? vfree(ptr) : kfree(ptr);
-}
-
static void __free_fdtable(struct fdtable *fdt)
{
-
free_fdmem
(fdt->fd);
-
free_fdmem
(fdt->open_fds);
+
kvfree
(fdt->fd);
+
kvfree
(fdt->open_fds);
kfree(fdt);
}
@@
-130,7
+125,7
@@
static struct fdtable * alloc_fdtable(unsigned int nr)
return fdt;
out_arr:
-
free_fdmem
(fdt->fd);
+
kvfree
(fdt->fd);
out_fdt:
kfree(fdt);
out: