diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-23 16:18:46 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 23:31:10 +0200 |
commit | f6c0a1920e0180175bd5e8e4aff8ea5556f1895d (patch) | |
tree | e432b4e37b8f7ae6439a0644bf6e3add38dae9d8 /fs/file.c | |
parent | Merge branch 'akpm' (incoming from Andrew) (diff) | |
download | linux-f6c0a1920e0180175bd5e8e4aff8ea5556f1895d.tar.xz linux-f6c0a1920e0180175bd5e8e4aff8ea5556f1895d.zip |
fs/file.c: don't open-code kvfree()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/file.c')
-rw-r--r-- | fs/file.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/file.c b/fs/file.c index 8f294cfac697..66923fe3176e 100644 --- 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: |