ipc/util.c: Use kvfree() in ipc_rcu_free()
Subsystems (15)
PATCH 1/14 ipc/util.c: Use kvfree() in ipc_rcu_free()
Use kvfree() instead of open-coding it.
--- ipc/util.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
ipc/util.c +1 -4
@@ -467,10 +467,7 @@ void ipc_rcu_free(struct rcu_head *head) { struct ipc_rcu *p = container_of(head, struct ipc_rcu, rcu); -if (is_vmalloc_addr (p)) -vfree (p); -else -kfree (p); +kvfree (p); }/**
Signature · 1 line
2.1.0
PATCH 2/14 kernel/relay.c: Use kvfree() in relay_free_page_array()
Use kvfree() instead of open-coding it.
--- kernel/relay.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
kernel/relay.c +1 -4
@@ -81,10 +81,7 @@ static struct page **relay_alloc_page_array(unsigned int n_pages)*/ static void relay_free_page_array (struct page **array) { -if (is_vmalloc_addr (array)) -vfree (array); -else -kfree (array); +kvfree (array); }/**
Signature · 1 line
2.1.0
PATCH 3/14 cxgb3: Use kvfree() in cxgb_free_mem()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c +1 -4
@@ -1169,10 +1169,7 @@ void *cxgb_alloc_mem(unsigned long size)*/ void cxgb_free_mem (void *addr) { -if (is_vmalloc_addr (addr)) -vfree (addr); -else -kfree (addr); +kvfree (addr); }/*
Signature · 1 line
2.1.0
PATCH 4/14 cxgb4: Use kvfree() in t4_free_mem()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -4
@@ -1121,10 +1121,7 @@ void *t4_alloc_mem(size_t size)*/ void t4_free_mem (void *addr) { -if (is_vmalloc_addr (addr)) -vfree (addr); -else -kfree (addr); +kvfree (addr); }/* Send a Work Request to write the filter at a specified index. We construct
Signature · 1 line
2.1.0
PATCH 5/14 ceph: Use kvfree() in ceph_put_page_vector()
In reply to Pekka EnbergUse kvfree instead of open-coding it.
--- net/ceph/pagevec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
net/ceph/pagevec.c +1 -4
@@ -51,10 +51,7 @@ void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty)set_page_dirty_lock (pages[i]);put_page (pages[i]); } -if (is_vmalloc_addr (pages)) -vfree (pages); -else -kfree (pages); +kvfree (pages); }EXPORT_SYMBOL (ceph_put_page_vector);
Signature · 1 line
2.1.0
Re: [PATCH 05/14] ceph: Use kvfree() in ceph_put_page_vector()
Quoted 17 lines · Pekka Enberg
Use kvfree instead of open-coding it.
Cc "Yan, Zheng" <[email protected]>Cc Sage Weil <[email protected]>Signed-off-by Pekka Enberg <[email protected]>---
net/ceph/pagevec.c| 5 +----1 file changed, 1 insertion(+), 4 deletions(-)net/ceph/pagevec.c +0
-0
net/ceph/pagevec.c void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty) · line 56
Quoted 10 lines
net/ceph/pagevec.c +1
-4@@ -51,10 +51,7 @@ void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty)set_page_dirty_lock (pages[i]);put_page (pages[i]); } -if (is_vmalloc_addr (pages)) -vfree (pages); -else -kfree (pages); +kvfree (pages); }EXPORT_SYMBOL (ceph_put_page_vector);
Thanks. but Ilya Dryomov has already submitted a similar patch.
Quoted 4 lines
Signature · 2 lines
-- 2.1.0
Re: [PATCH 05/14] ceph: Use kvfree() in ceph_put_page_vector()
In reply to Pekka EnbergQuoted 17 lines · Pekka Enberg
Use kvfree instead of open-coding it.
Cc "Yan, Zheng" <[email protected]>Cc Sage Weil <[email protected]>Signed-off-by Pekka Enberg <[email protected]>---
net/ceph/pagevec.c| 5 +----1 file changed, 1 insertion(+), 4 deletions(-)net/ceph/pagevec.c +0
-0
net/ceph/pagevec.c void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty) · line 56
Quoted 10 lines
net/ceph/pagevec.c +1
-4@@ -51,10 +51,7 @@ void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty)set_page_dirty_lock (pages[i]);put_page (pages[i]); } -if (is_vmalloc_addr (pages)) -vfree (pages); -else -kfree (pages); +kvfree (pages); }EXPORT_SYMBOL (ceph_put_page_vector);
Thanks. but Ilya Dryomov has already submitted a similar patch.
Quoted 4 lines
Signature · 2 lines
-- 2.1.0
Re: [PATCH 05/14] ceph: Use kvfree() in ceph_put_page_vector()
In reply to Pekka EnbergQuoted 17 lines · Pekka Enberg
Use kvfree instead of open-coding it.
Cc "Yan, Zheng" <[email protected]>Cc Sage Weil <[email protected]>Signed-off-by Pekka Enberg <[email protected]>---
net/ceph/pagevec.c| 5 +----1 file changed, 1 insertion(+), 4 deletions(-)net/ceph/pagevec.c +0
-0
net/ceph/pagevec.c void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty) · line 56
Quoted 10 lines
net/ceph/pagevec.c +1
-4@@ -51,10 +51,7 @@ void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty)set_page_dirty_lock (pages[i]);put_page (pages[i]); } -if (is_vmalloc_addr (pages)) -vfree (pages); -else -kfree (pages); +kvfree (pages); }EXPORT_SYMBOL (ceph_put_page_vector);
Thanks. but Ilya Dryomov has already submitted a similar patch.
Quoted 4 lines
Signature · 2 lines
-- 2.1.0
PATCH 6/14 drm: Use kvfree() in drm_free_large()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- include/drm/drm_mem_util.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
include/drm/drm_mem_util.h +1 -4
@@ -56,10 +56,7 @@ static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)static __inlinevoid drm_free_large (void *ptr) { -if (!is_vmalloc_addr (ptr)) -return kfree (ptr); - -vfree (ptr); +kvfree (ptr); }#endif
Signature · 1 line
2.1.0
PATCH 7/14 drm/nouveau/gem: Use kvfree() in u_free()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/gpu/drm/nouveau/nouveau_gem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/nouveau/nouveau_gem.c +1 -4
@@ -555,10 +555,7 @@ nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,static inline void u_free (void *addr) { -if (!is_vmalloc_addr (addr)) -kfree (addr); -else -vfree (addr); +kvfree (addr); } static inline void *
Signature · 1 line
2.1.0
PATCH 8/14 drivers/input/evdev.c: Use kvfree() in evdev_release()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/input/evdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/input/evdev.c +1 -4
@@ -422,10 +422,7 @@ static int evdev_release(struct inode *inode, struct file *file)evdev_detach_client (evdev, client); -if (is_vmalloc_addr (client)) -vfree (client); -else -kfree (client); +kvfree (client);evdev_close_device (evdev);
Signature · 1 line
2.1.0
Re: [PATCH 08/14] drivers/input/evdev.c: Use kvfree() in evdev_release()
Quoted 4 lines · Pekka Enberg
Use
kvfree()instead of open-coding it.Cc Dmitry Torokhov <[email protected]>Signed-off-by Pekka Enberg <[email protected]>
Applied, thank you.
Quoted 23 lines
--- drivers/input/evdev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/input/evdev.c +1
-4@@ -422,10 +422,7 @@ static int evdev_release(struct inode *inode, struct file *file)evdev_detach_client (evdev, client); -if (is_vmalloc_addr (client)) -vfree (client); -else -kfree (client); +kvfree (client);evdev_close_device (evdev);Signature · 1 line
2.1.0
Signature · 1 line
Dmitry
PATCH 9/14 IB/ehca: Use kvfree() in ipz_queue_{cd}tor()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/infiniband/hw/ehca/ipz_pt_fn.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/infiniband/hw/ehca/ipz_pt_fn.c +2 -8
@@ -245,10 +245,7 @@ int ipz_queue_ctor(struct ehca_pd *pd, struct ipz_queue *queue, ipz_queue_ctor_exit0:ehca_gen_err ("Couldn't alloc pages queue=%p " "nr_of_pages=%x" , queue, nr_of_pages); -if (is_vmalloc_addr (queue->queue_pages)) -vfree (queue->queue_pages); -else -kfree (queue->queue_pages); +kvfree (queue->queue_pages);return 0 ; }
@@ -270,10 +267,7 @@ int ipz_queue_dtor(struct ehca_pd *pd, struct ipz_queue *queue)free_page ((unsigned long )queue->queue_pages[i]); } -if (is_vmalloc_addr (queue->queue_pages)) -vfree (queue->queue_pages); -else -kfree (queue->queue_pages); +kvfree (queue->queue_pages);return 1 ; }
Signature · 1 line
2.1.0
PATCH 10/14 target: Use kvfree() in session alloc and free
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/target/target_core_transport.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/target/target_core_transport.c +2 -8
@@ -280,10 +280,7 @@ int transport_alloc_session_tags(struct se_session *se_sess,if (rc <0 ) {pr_err ("Unable to init se_sess->sess_tag_pool," " tag_num: %u\n" , tag_num); -if (is_vmalloc_addr (se_sess->sess_cmd_map)) -vfree (se_sess->sess_cmd_map); -else -kfree (se_sess->sess_cmd_map); +kvfree (se_sess->sess_cmd_map); se_sess->sess_cmd_map =NULL ;return -ENOMEM ; }
@@ -490,10 +487,7 @@ void transport_free_session(struct se_session *se_sess) {if (se_sess->sess_cmd_map) {percpu_ida_destroy (&se_sess->sess_tag_pool); -if (is_vmalloc_addr (se_sess->sess_cmd_map)) -vfree (se_sess->sess_cmd_map); -else -kfree (se_sess->sess_cmd_map); +kvfree (se_sess->sess_cmd_map); }kmem_cache_free (se_sess_cache, se_sess); }
Signature · 1 line
2.1.0
PATCH 11/14 libcxgbi: Use kvfree() in cxgbi_free_big_mem()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/scsi/cxgbi/libcxgbi.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/scsi/cxgbi/libcxgbi.h +1 -4
@@ -685,10 +685,7 @@ static inline void *cxgbi_alloc_big_mem(unsigned int size,static inline void cxgbi_free_big_mem (void *addr) { -if (is_vmalloc_addr (addr)) -vfree (addr); -else -kfree (addr); +kvfree (addr); }static inline void cxgbi_set_iscsi_ipv4 (struct cxgbi_hba *chba,__be32 ipaddr)
Signature · 1 line
2.1.0
PATCH 12/14 dm: Use kvfree() in dm_kvfree()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/md/dm-stats.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/md/dm-stats.c +1 -4
@@ -160,10 +160,7 @@ static void dm_kvfree(void *ptr, size_t alloc_size)free_shared_memory (alloc_size); -if (is_vmalloc_addr (ptr)) -vfree (ptr); -else -kfree (ptr); +kvfree (ptr); }static void dm_stat_free (struct rcu_head *head)
Signature · 1 line
2.1.0
Re: [PATCH 12/14] dm: Use kvfree() in dm_kvfree()
Quoted 5 lines · Pekka Enberg
Use
kvfree()instead of open-coding it.Cc Alasdair Kergon <[email protected]>Cc Mike Snitzer <[email protected]>Signed-off-by Pekka Enberg <[email protected]>
Thanks Pekka. Picked this up for 4.2.
PATCH 13/14 bcache: Use kvfree() in various places
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- drivers/md/bcache/super.c | 10 ++-------- drivers/md/bcache/util.h | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-)
drivers/md/bcache/super.c +2 -8
@@ -760,14 +760,8 @@ static void bcache_device_free(struct bcache_device *d)bio_split_pool_free (&d->bio_split_hook);if (d->bio_split)bioset_free (d->bio_split); -if (is_vmalloc_addr (d->full_dirty_stripes)) -vfree (d->full_dirty_stripes); -else -kfree (d->full_dirty_stripes); -if (is_vmalloc_addr (d->stripe_sectors_dirty)) -vfree (d->stripe_sectors_dirty); -else -kfree (d->stripe_sectors_dirty); +kvfree (d->full_dirty_stripes); +kvfree (d->stripe_sectors_dirty);closure_debug_destroy (&d->cl); }
drivers/md/bcache/util.h +2 -8
@@ -52,10 +52,7 @@ struct closure;#define free_heap (heap) \ do { \ - if (is_vmalloc_addr((heap)->data)) \ - vfree((heap)->data); \ - else \ - kfree((heap)->data); \ + kvfree((heap)->data); \ (heap)->data = NULL; \ } while (0)
@@ -163,10 +160,7 @@ do { \#define free_fifo (fifo) \ do { \ - if (is_vmalloc_addr((fifo)->data)) \ - vfree((fifo)->data); \ - else \ - kfree((fifo)->data); \ + kvfree((fifo)->data); \ (fifo)->data = NULL; \ } while (0)
Signature · 1 line
2.1.0
PATCH 14/14 NTFS: Use kvfree() in ntfs_free()
In reply to Pekka EnbergUse kvfree() instead of open-coding it.
--- fs/ntfs/malloc.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
fs/ntfs/malloc.h +1 -6
@@ -85,12 +85,7 @@ static inline void *ntfs_malloc_nofs_nofail(unsigned long size)static inline void ntfs_free (void *addr) { -if (!is_vmalloc_addr (addr)) { -kfree (addr); -/* free_page((unsigned long)addr); */ -return ; - } -vfree (addr); +kvfree (addr); }#endif /* _LINUX_NTFS_MALLOC_H */
Signature · 1 line
2.1.0