clean up SLAB_KERNEL non-usage
Subsystems (42)
Use SLAB_KERNEL and SLAB_ATOMIC instead of GFP_KERNEL and GFP_ATOMIC when passing args to slab allocation functions.
arch/arm/mach-arc/mm.c | 2 +- drivers/block/deadline-iosched.c | 2 +- drivers/md/raid5.c | 2 +- fs/aio.c | 4 ++-- fs/dcache.c | 2 +- fs/dcookies.c | 2 +- fs/exec.c | 4 ++-- fs/jbd/revoke.c | 2 +- fs/jffs/jffs_fm.c | 4 ++-- fs/jffs2/malloc.c | 14 +++++++------- fs/mbcache.c | 2 +- fs/namespace.c | 2 +- include/asm-arm/proc-armo/pgalloc.h | 2 +- kernel/fork.c | 8 ++++---- kernel/signal.c | 2 +- net/ipv4/inetpeer.c | 2 +- net/ipv4/ipmr.c | 4 ++-- 17 files changed, 30 insertions(+), 30 deletions(-)
arch/arm/mach-arc/mm.c +1 -1
@@ -34,7 +34,7 @@ int page_nr;*/ static inline pgd_t *alloc_pgd_table (int priority) { -void *pg2k =kmem_cache_alloc (pgd_cache,GFP_KERNEL ); +void *pg2k =kmem_cache_alloc (pgd_cache,SLAB_KERNEL );if (pg2k) pg2k +=MEMC_TABLE_SIZE ;
drivers/block/deadline-iosched.c +1 -1
@@ -740,7 +740,7 @@ static int deadline_init(request_queue_tlist_for_each (entry, &rl->free) { rq =list_entry_rq (entry); - drq =kmem_cache_alloc (drq_pool,GFP_KERNEL ); + drq =kmem_cache_alloc (drq_pool,SLAB_KERNEL );if (!drq) { ret = -ENOMEM ;break ;
drivers/md/raid5.c +1 -1
@@ -282,7 +282,7 @@ static int grow_stripes(raid5_conf_t *coreturn 1 ; conf->slab_cache = sc;while (num--) { - sh =kmem_cache_alloc (sc,GFP_KERNEL ); + sh =kmem_cache_alloc (sc,SLAB_KERNEL );if (!sh)return 1 ;memset (sh,0 ,sizeof (*sh) + (devs-1 )*sizeof (struct r5dev ));
fs/aio.c +2 -2
@@ -215,7 +215,7 @@ static struct kioctx *ioctx_alloc(unsignif (nr_events > aio_max_nr)return ERR_PTR (-EAGAIN ); - ctx =kmem_cache_alloc (kioctx_cachep,GFP_KERNEL ); + ctx =kmem_cache_alloc (kioctx_cachep,SLAB_KERNEL );if (!ctx)return ERR_PTR (-ENOMEM );
@@ -384,7 +384,7 @@ static struct kiocb *__aio_get_req(strucstruct aio_ring *ring;int okay =0 ; - req =kmem_cache_alloc (kiocb_cachep,GFP_KERNEL ); + req =kmem_cache_alloc (kiocb_cachep,SLAB_KERNEL );if (unlikely (!req))return NULL ;
fs/dcache.c +1 -1
@@ -631,7 +631,7 @@ struct dentry * d_alloc(struct dentry *char * str;struct dentry *dentry; - dentry =kmem_cache_alloc (dentry_cache,GFP_KERNEL ); + dentry =kmem_cache_alloc (dentry_cache,SLAB_KERNEL );if (!dentry)return NULL ;
fs/dcookies.c +1 -1
@@ -89,7 +89,7 @@ static void hash_dcookie(struct dcookie_static struct dcookie_struct *alloc_dcookie (struct dentry * dentry,struct vfsmount * vfsmnt) { -struct dcookie_struct * dcs =kmem_cache_alloc (dcookie_cache,GFP_KERNEL ); +struct dcookie_struct * dcs =kmem_cache_alloc (dcookie_cache,SLAB_KERNEL );if (!dcs)return NULL ;
fs/exec.c +2 -2
@@ -573,7 +573,7 @@ static inline int de_thread(struct task_if (atomic_read (&oldsighand->count) <=1 )return 0 ; - newsighand =kmem_cache_alloc (sighand_cachep,GFP_KERNEL ); + newsighand =kmem_cache_alloc (sighand_cachep,SLAB_KERNEL );if (!newsighand)return -ENOMEM ;
@@ -586,7 +586,7 @@ static inline int de_thread(struct task_*/ newsig =NULL ;if (atomic_read (&oldsig->count) >1 ) { - newsig =kmem_cache_alloc (signal_cachep,GFP_KERNEL ); + newsig =kmem_cache_alloc (signal_cachep,SLAB_KERNEL );if (!newsig) {kmem_cache_free (sighand_cachep, newsighand);return -ENOMEM ;
fs/jbd/revoke.c +1 -1
@@ -194,7 +194,7 @@ int journal_init_revoke(journal_t *journJ_ASSERT (journal->j_revoke ==NULL ); - journal->j_revoke =kmem_cache_alloc (revoke_table_cache,GFP_KERNEL ); + journal->j_revoke =kmem_cache_alloc (revoke_table_cache,SLAB_KERNEL );if (!journal->j_revoke)return -ENOMEM ;
fs/jffs/jffs_fm.c +2 -2
@@ -706,7 +706,7 @@ struct jffs_fm *jffs_alloc_fm(void) {struct jffs_fm *fm; - fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); + fm =kmem_cache_alloc (fm_cache,SLAB_KERNEL ); DJM(if (fm) no_jffs_fm++;);return fm;
@@ -724,7 +724,7 @@ struct jffs_node *jffs_alloc_node(void) {struct jffs_node *n; - n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL ); + n = (struct jffs_node *)kmem_cache_alloc (node_cache,SLAB_KERNEL );if (n !=NULL ) no_jffs_node++;return n;
fs/jffs2/malloc.c +7 -7
@@ -111,7 +111,7 @@ void jffs2_free_full_dirent(struct jffs2struct jffs2_full_dnode *jffs2_alloc_full_dnode (void ) { -void *ret =kmem_cache_alloc (full_dnode_slab,GFP_KERNEL ); +void *ret =kmem_cache_alloc (full_dnode_slab,SLAB_KERNEL );return ret; }
@@ -122,7 +122,7 @@ void jffs2_free_full_dnode(struct jffs2_struct jffs2_raw_dirent *jffs2_alloc_raw_dirent (void ) { -return kmem_cache_alloc (raw_dirent_slab,GFP_KERNEL ); +return kmem_cache_alloc (raw_dirent_slab,SLAB_KERNEL ); }void jffs2_free_raw_dirent (struct jffs2_raw_dirent *x)
@@ -132,7 +132,7 @@ void jffs2_free_raw_dirent(struct jffs2_struct jffs2_raw_inode *jffs2_alloc_raw_inode (void ) { -return kmem_cache_alloc (raw_inode_slab,GFP_KERNEL ); +return kmem_cache_alloc (raw_inode_slab,SLAB_KERNEL ); }void jffs2_free_raw_inode (struct jffs2_raw_inode *x)
@@ -142,7 +142,7 @@ void jffs2_free_raw_inode(struct jffs2_rstruct jffs2_tmp_dnode_info *jffs2_alloc_tmp_dnode_info (void ) { -return kmem_cache_alloc (tmp_dnode_info_slab,GFP_KERNEL ); +return kmem_cache_alloc (tmp_dnode_info_slab,SLAB_KERNEL ); }void jffs2_free_tmp_dnode_info (struct jffs2_tmp_dnode_info *x)
@@ -152,7 +152,7 @@ void jffs2_free_tmp_dnode_info(struct jfstruct jffs2_raw_node_ref *jffs2_alloc_raw_node_ref (void ) { -return kmem_cache_alloc (raw_node_ref_slab,GFP_KERNEL ); +return kmem_cache_alloc (raw_node_ref_slab,SLAB_KERNEL ); }void jffs2_free_raw_node_ref (struct jffs2_raw_node_ref *x)
@@ -162,7 +162,7 @@ void jffs2_free_raw_node_ref(struct jffsstruct jffs2_node_frag *jffs2_alloc_node_frag (void ) { -return kmem_cache_alloc (node_frag_slab,GFP_KERNEL ); +return kmem_cache_alloc (node_frag_slab,SLAB_KERNEL ); }void jffs2_free_node_frag (struct jffs2_node_frag *x)
@@ -172,7 +172,7 @@ void jffs2_free_node_frag(struct jffs2_nstruct jffs2_inode_cache *jffs2_alloc_inode_cache (void ) { -struct jffs2_inode_cache *ret =kmem_cache_alloc (inode_cache_slab,GFP_KERNEL ); +struct jffs2_inode_cache *ret =kmem_cache_alloc (inode_cache_slab,SLAB_KERNEL );D1 (printk (KERN_DEBUG "Allocated inocache at %p\n" , ret));return ret; }
fs/mbcache.c +1 -1
@@ -379,7 +379,7 @@ mb_cache_entry_alloc(struct mb_cache *castruct mb_cache_entry *ce;atomic_inc (&cache->c_entry_count); - ce =kmem_cache_alloc (cache->c_entry_cache,GFP_KERNEL ); + ce =kmem_cache_alloc (cache->c_entry_cache,SLAB_KERNEL );if (ce) {INIT_LIST_HEAD (&ce->e_lru_list);INIT_LIST_HEAD (&ce->e_block_list);
fs/namespace.c +1 -1
@@ -41,7 +41,7 @@ static inline unsigned long hash(structstruct vfsmount *alloc_vfsmnt (char *name) { -struct vfsmount *mnt =kmem_cache_alloc (mnt_cache,GFP_KERNEL ); +struct vfsmount *mnt =kmem_cache_alloc (mnt_cache,SLAB_KERNEL );if (mnt) {memset (mnt,0 ,sizeof (struct vfsmount ));atomic_set (&mnt->mnt_count,1 );
include/asm-arm/proc-armo/pgalloc.h +1 -1
@@ -13,7 +13,7 @@ extern kmem_cache_t *pte_cache;static inline pte_t *pte_alloc_one_kernel (struct mm_struct *mm,unsigned long addr) { -return kmem_cache_alloc (pte_cache,GFP_KERNEL ); +return kmem_cache_alloc (pte_cache,SLAB_KERNEL ); }static inline void pte_free_kernel (pte_t *pte)
kernel/fork.c +4 -4
@@ -205,7 +205,7 @@ static struct task_struct *dup_task_struif (!ti)return NULL ; - tsk =kmem_cache_alloc (task_struct_cachep,GFP_KERNEL ); + tsk =kmem_cache_alloc (task_struct_cachep,SLAB_KERNEL );if (!tsk) {free_thread_info (ti);return NULL ;
@@ -503,7 +503,7 @@ fail_nomem:static inline struct fs_struct *__copy_fs_struct (struct fs_struct *old) { -struct fs_struct *fs =kmem_cache_alloc (fs_cachep,GFP_KERNEL ); +struct fs_struct *fs =kmem_cache_alloc (fs_cachep,SLAB_KERNEL );/* We don't need to lock fs - think why ;-) */ if (fs) {atomic_set (&fs->count,1 );
@@ -671,7 +671,7 @@ static inline int copy_sighand(unsignedatomic_inc (¤t->sighand->count);return 0 ; } - sig =kmem_cache_alloc (sighand_cachep,GFP_KERNEL ); + sig =kmem_cache_alloc (sighand_cachep,SLAB_KERNEL ); tsk->sighand = sig;if (!sig)return -1 ;
@@ -689,7 +689,7 @@ static inline int copy_signal(unsigned latomic_inc (¤t->signal->count);return 0 ; } - sig =kmem_cache_alloc (signal_cachep,GFP_KERNEL ); + sig =kmem_cache_alloc (signal_cachep,SLAB_KERNEL ); tsk->signal = sig;if (!sig)return -1 ;
kernel/signal.c +1 -1
@@ -693,7 +693,7 @@ static int send_signal(int sig, struct spass on the info struct. */ if (atomic_read (&nr_queued_signals) < max_queued_signals) - q =kmem_cache_alloc (sigqueue_cachep,GFP_ATOMIC ); + q =kmem_cache_alloc (sigqueue_cachep,SLAB_ATOMIC );if (q) {atomic_inc (&nr_queued_signals);
net/ipv4/inetpeer.c +1 -1
@@ -392,7 +392,7 @@ struct inet_peer *inet_getpeer(__u32 dadreturn NULL ;/* Allocate the space outside the locked region. */ - n =kmem_cache_alloc (peer_cachep,GFP_ATOMIC ); + n =kmem_cache_alloc (peer_cachep,SLAB_ATOMIC );if (n ==NULL )return NULL ; n->v4daddr = daddr;
net/ipv4/ipmr.c +2 -2
@@ -467,7 +467,7 @@ static struct mfc_cache *ipmr_cache_find*/ static struct mfc_cache *ipmr_cache_alloc (void ) { -struct mfc_cache *c=kmem_cache_alloc (mrt_cachep,GFP_KERNEL ); +struct mfc_cache *c=kmem_cache_alloc (mrt_cachep,SLAB_KERNEL );if (c==NULL )return NULL ;memset (c,0 ,sizeof (*c));
@@ -477,7 +477,7 @@ static struct mfc_cache *ipmr_cache_allostatic struct mfc_cache *ipmr_cache_alloc_unres (void ) { -struct mfc_cache *c=kmem_cache_alloc (mrt_cachep,GFP_ATOMIC ); +struct mfc_cache *c=kmem_cache_alloc (mrt_cachep,SLAB_ATOMIC );if (c==NULL )return NULL ;memset (c,0 ,sizeof (*c));
Quoted 2 lines · William Lee Irwin III
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.
Why? I'd prefer to completly get rid of the SLAB_ flags instead.
(stupid slowaris compat..)
Quoted 2 lines · William Lee Irwin III
Quoted 2 lines
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.
Quoted 2 lines · Christoph Hellwig
Why? I'd prefer to completly get rid of the
SLAB_flags instead. (stupid slowaris compat..)
IMHO different API, different flags. The inverse is not that difficult to produce, though.
-- wli
Quoted 10 lines · William Lee Irwin III
Quoted 2 lines · William Lee Irwin III
Quoted 2 lines
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.Quoted 2 lines · Christoph Hellwig
Why? I'd prefer to completly get rid of the
SLAB_flags instead. (stupid slowaris compat..)IMHO different API, different flags. The inverse is not that difficult to produce, though.
I don't think this make much sense - kmalloc is a a different interface to the same slab code and uses GFP_ flags, and __alloc_pages uses it aswell.
Quoted 2 lines · William Lee Irwin III
Quoted 2 lines
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.
Quoted 2 lines · Christoph Hellwig
Why? I'd prefer to completly get rid of the
SLAB_flags instead. (stupid slowaris compat..)
Kill SLAB_KERNEL and SLAB_ATOMIC.
Documentation/DMA-mapping.txt | 4 +- Documentation/filesystems/devfs/ChangeLog | 1 Documentation/usb/URB.txt | 2 - arch/arm/common/sa1111-pcipool.c | 6 ++-- arch/i386/mm/pgtable.c | 4 +- arch/ia64/ia32/binfmt_elf32.c | 6 ++-- arch/ia64/kernel/perfmon.c | 2 - arch/ia64/mm/init.c | 4 +- arch/s390x/kernel/exec32.c | 2 - arch/x86_64/ia32/ia32_binfmt.c | 2 - drivers/block/DAC960.c | 4 +- drivers/block/ll_rw_blk.c | 2 - drivers/ieee1394/amdtp.c | 16 +++++----- drivers/ieee1394/cmp.c | 2 - drivers/ieee1394/eth1394.c | 2 - drivers/ieee1394/hosts.c | 2 - drivers/ieee1394/iso.c | 2 - drivers/ieee1394/nodemgr.c | 2 - drivers/ieee1394/ohci1394.c | 12 ++++---- drivers/ieee1394/pcilynx.c | 2 - drivers/ieee1394/raw1394.c | 44 +++++++++++++++--------------- drivers/ieee1394/sbp2.c | 2 - drivers/pci/pool.c | 8 ++--- drivers/usb/core/hub.c | 2 - drivers/usb/core/message.c | 2 - drivers/usb/host/ehci-dbg.c | 2 - drivers/usb/host/ehci-hcd.c | 2 - drivers/usb/host/ehci-q.c | 2 - drivers/usb/host/ohci-dbg.c | 2 - drivers/usb/host/ohci-q.c | 4 +- drivers/usb/host/uhci-hcd.c | 2 - drivers/usb/input/aiptek.c | 2 - drivers/usb/input/hid-core.c | 10 +++--- drivers/usb/input/powermate.c | 4 +- drivers/usb/input/usbkbd.c | 8 ++--- drivers/usb/input/usbmouse.c | 4 +- drivers/usb/input/wacom.c | 2 - drivers/usb/input/xpad.c | 2 - drivers/usb/misc/usbtest.c | 28 +++++++++---------- drivers/usb/net/catc.c | 2 - drivers/usb/net/kaweth.c | 2 - drivers/usb/net/pegasus.c | 2 - drivers/usb/net/rtl8150.c | 2 - fs/adfs/super.c | 2 - fs/affs/super.c | 2 - fs/afs/super.c | 2 - fs/befs/linuxvfs.c | 2 - fs/bfs/inode.c | 2 - fs/block_dev.c | 2 - fs/char_dev.c | 2 - fs/cifs/cifsfs.c | 2 - fs/cifs/misc.c | 2 - fs/cifs/transport.c | 2 - fs/coda/inode.c | 2 - fs/devfs/base.c | 4 +- fs/dnotify.c | 2 - fs/dquot.c | 2 - fs/efs/super.c | 2 - fs/eventpoll.c | 4 +- fs/exec.c | 2 - fs/ext2/super.c | 2 - fs/fat/inode.c | 2 - fs/fcntl.c | 2 - fs/file_table.c | 2 - fs/freevxfs/vxfs_fshead.c | 2 - fs/freevxfs/vxfs_inode.c | 4 +- fs/hfs/super.c | 2 - fs/hpfs/super.c | 2 - fs/inode.c | 2 - fs/intermezzo/dcache.c | 2 - fs/isofs/inode.c | 2 - fs/jffs/jffs_fm.c | 4 +- fs/jffs2/super.c | 2 - fs/locks.c | 2 - fs/minix/inode.c | 2 - fs/ncpfs/inode.c | 2 - fs/nfs/inode.c | 2 - fs/proc/inode.c | 2 - fs/qnx4/inode.c | 2 - fs/reiserfs/super.c | 2 - fs/romfs/inode.c | 2 - fs/smbfs/inode.c | 2 - fs/smbfs/request.c | 2 - fs/sysv/inode.c | 2 - fs/udf/super.c | 2 - fs/ufs/super.c | 2 - include/linux/fs.h | 2 - include/linux/slab.h | 2 - include/net/tcp.h | 2 - kernel/fork.c | 6 ++-- kernel/user.c | 2 - mm/mmap.c | 6 ++-- mm/mremap.c | 2 - mm/shmem.c | 2 - mm/slab.c | 2 - net/core/dst.c | 2 - net/core/neighbour.c | 2 - net/decnet/dn_table.c | 2 - net/ipv4/fib_hash.c | 2 - net/ipv4/tcp_ipv4.c | 2 - net/ipv4/tcp_minisocks.c | 2 - net/ipv4/xfrm_input.c | 2 - net/ipv4/xfrm_policy.c | 2 - net/ipv6/ip6_fib.c | 2 - net/socket.c | 2 - net/sunrpc/rpc_pipe.c | 2 - 106 files changed, 180 insertions(+), 181 deletions(-)
Documentation/DMA-mapping.txt +2 -2
@@ -341,8 +341,8 @@ Allocate memory from a pci pool like thi cpu_addr = pci_pool_alloc(pool, flags, &dma_handle); -flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor -holding SMP locks), SLAB_ATOMIC otherwise. Like pci_alloc_consistent, +flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor +holding SMP locks), GFP_ATOMIC otherwise. Like pci_alloc_consistent, this returns two values, cpu_addr and dma_handle. Free memory that was allocated from a pci_pool like this:
Documentation/filesystems/devfs/ChangeLog +1 -1
@@ -1822,7 +1822,7 @@ Changes for patch v202 =============================================================================== Changes for patch v203 -- Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> +- Use GFP_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> =============================================================================== Changes for patch v204
Documentation/usb/URB.txt +1 -1
@@ -121,7 +121,7 @@ Just call int usb_submit_urb(struct urb *urb, int mem_flags) -The mem_flags parameter, such as SLAB_ATOMIC, controls memory allocation, +The mem_flags parameter, such as GFP_ATOMIC, controls memory allocation, such as whether the lower levels may block when memory is tight. It immediately returns, either with status 0 (request queued) or some
arch/arm/common/sa1111-pcipool.c +3 -3
@@ -110,7 +110,7 @@ pci_pool_create (const char *name, struc }else if (allocation < size)return 0 ; -if (!(retval =kmalloc (sizeof *retval,SLAB_KERNEL ))) +if (!(retval =kmalloc (sizeof *retval,GFP_KERNEL )))return retval;strncpy (retval->name, name,sizeof retval->name);
@@ -228,7 +228,7 @@ pci_pool_destroy (struct pci_pool *pool)/** * pci_pool_alloc - get a block of consistent memory * @pool: pci pool that will produce the block -* @mem_flags: SLAB_KERNEL or SLAB_ATOMIC +* @mem_flags: GFP_KERNEL or GFP_ATOMIC * @handle: pointer to dma address of block * * This returns the kernel virtual address of a currently unused block,
@@ -266,7 +266,7 @@ restart: } }if (!(page =pool_alloc_page (pool, mem_flags))) { -if (mem_flags ==SLAB_KERNEL ) { +if (mem_flags ==GFP_KERNEL ) {DECLARE_WAITQUEUE (wait, current); current->state =TASK_INTERRUPTIBLE ;
arch/i386/mm/pgtable.c +2 -2
@@ -188,7 +188,7 @@ void pgd_ctor(void *__pgd, kmem_cache_tpgd_t *pgd_alloc (struct mm_struct *mm) {int i; -pgd_t *pgd =kmem_cache_alloc (pgd_cache,SLAB_KERNEL ); +pgd_t *pgd =kmem_cache_alloc (pgd_cache,GFP_KERNEL );if (PTRS_PER_PMD ==1 )return pgd;
@@ -196,7 +196,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)return NULL ;for (i =0 ; i <USER_PTRS_PER_PGD ; ++i) { -pmd_t *pmd =kmem_cache_alloc (pmd_cache,SLAB_KERNEL ); +pmd_t *pmd =kmem_cache_alloc (pmd_cache,GFP_KERNEL );if (!pmd) goto out_oom;set_pgd (pgd + i,__pgd (1 +__pa ((unsigned long long )((unsigned long )pmd))));
arch/ia64/ia32/binfmt_elf32.c +3 -3
@@ -79,7 +79,7 @@ ia64_elf32_init (struct pt_regs *regs)* it with privilege level 3 because the IVE uses non-privileged accesses to these * tables. IA-32 segmentation is used to protect against IA-32 accesses to them. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA32_GDT_OFFSET ;
@@ -101,7 +101,7 @@ ia64_elf32_init (struct pt_regs *regs)* Install LDT as anonymous memory. This gives us all-zero segment descriptors * until a task modifies them via modify_ldt(). */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA32_LDT_OFFSET ;
@@ -172,7 +172,7 @@ ia32_setup_arg_pages (struct linux_binpr bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
arch/ia64/kernel/perfmon.c +1 -1
@@ -796,7 +796,7 @@ pfm_smpl_buffer_alloc(pfm_context_t *ctx }/* allocate vma */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!vma) {DBprintk (("Cannot allocate vma\n" )); goto error_kmem;
arch/ia64/mm/init.c +2 -2
@@ -74,7 +74,7 @@ ia64_init_addr_space (void)* the problem. When the process attempts to write to the register backing store * for the first time, it will get a SEGFAULT in this case. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA64_RBS_BOT ;
@@ -90,7 +90,7 @@ ia64_init_addr_space (void)/* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ if (!(current->personality &MMAP_PAGE_ZERO )) { - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) {memset (vma,0 ,sizeof (*vma)); vma->vm_mm = current->mm;
arch/s390x/kernel/exec32.c +1 -1
@@ -51,7 +51,7 @@ int setup_arg_pages32(struct linux_binpr bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
arch/x86_64/ia32/ia32_binfmt.c +1 -1
@@ -290,7 +290,7 @@ int setup_arg_pages(struct linux_binprm bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
drivers/block/DAC960.c +2 -2
@@ -251,13 +251,13 @@ static boolean DAC960_CreateAuxiliaryStr Command->Next = Controller->FreeCommands; Controller->FreeCommands = Command; Controller->Commands[CommandIdentifier-1 ] = Command; - ScatterGatherCPU =pci_pool_alloc (ScatterGatherPool,SLAB_ATOMIC , + ScatterGatherCPU =pci_pool_alloc (ScatterGatherPool,GFP_ATOMIC , &ScatterGatherDMA);if (ScatterGatherCPU ==NULL )return DAC960_Failure (Controller,"AUXILIARY STRUCTURE CREATION" );if (RequestSensePool !=NULL ) { - RequestSenseCPU =pci_pool_alloc (RequestSensePool,SLAB_ATOMIC , + RequestSenseCPU =pci_pool_alloc (RequestSensePool,GFP_ATOMIC , &RequestSenseDMA);if (RequestSenseCPU ==NULL ) { pci_pool_free(ScatterGatherPool, ScatterGatherCPU,
drivers/block/ll_rw_blk.c +1 -1
@@ -1222,7 +1222,7 @@ static int blk_init_free_list(request_qu*/ rl = &q->rq[READ ];for (i =0 ; i < (queue_nr_requests*2 ); i++) { - rq =kmem_cache_alloc (request_cachep,SLAB_KERNEL ); + rq =kmem_cache_alloc (request_cachep,GFP_KERNEL );if (!rq) goto nomem;
drivers/ieee1394/amdtp.c +8 -8
@@ -558,15 +558,15 @@ struct packet_list *packet_list_alloc(ststruct packet_list *pl;struct packet *next; - pl =kmalloc (sizeof *pl,SLAB_KERNEL ); + pl =kmalloc (sizeof *pl,GFP_KERNEL );if (pl ==NULL )return NULL ;for (i =0 ; i <PACKET_LIST_SIZE ; i++) {struct packet *p = &pl->packets[i]; - p->db =pci_pool_alloc (s->descriptor_pool,SLAB_KERNEL , + p->db =pci_pool_alloc (s->descriptor_pool,GFP_KERNEL , &p->db_bus); - p->payload =pci_pool_alloc (s->packet_pool,SLAB_KERNEL , + p->payload =pci_pool_alloc (s->packet_pool,GFP_KERNEL , &p->payload_bus); }
@@ -597,7 +597,7 @@ static struct buffer *buffer_alloc(int s {struct buffer *b; - b =kmalloc (sizeof *b + size,SLAB_KERNEL ); + b =kmalloc (sizeof *b + size,GFP_KERNEL ); b->head =0 ; b->tail =0 ; b->length =0 ;
@@ -834,7 +834,7 @@ static int stream_alloc_packet_lists(str max_packet_size = max_nevents * s->dimension *4 +8 ; s->packet_pool =hpsb_pci_pool_create ("packet pool" , s->host->ohci->dev, - max_packet_size,0 ,0 ,SLAB_KERNEL ); + max_packet_size,0 ,0 ,GFP_KERNEL );if (s->packet_pool ==NULL )return -1 ;
@@ -1006,7 +1006,7 @@ struct stream *stream_alloc(struct amdtpstruct stream *s;unsigned long flags; - s =kmalloc (sizeof (struct stream ),SLAB_KERNEL ); + s =kmalloc (sizeof (struct stream ),GFP_KERNEL );if (s ==NULL )return NULL ;
@@ -1021,7 +1021,7 @@ struct stream *stream_alloc(struct amdtp s->descriptor_pool =hpsb_pci_pool_create ("descriptor pool" , host->ohci->dev,sizeof (struct descriptor_block ), -16 ,0 ,SLAB_KERNEL ); +16 ,0 ,GFP_KERNEL );if (s->descriptor_pool ==NULL ) {kfree (s->input);
@@ -1212,7 +1212,7 @@ static void amdtp_add_host(struct hpsb_hif (strcmp (host->driver->name,OHCI1394_DRIVER_NAME ) !=0 )return ; - ah =kmalloc (sizeof *ah,in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + ah =kmalloc (sizeof *ah,in_interrupt () ?GFP_ATOMIC :GFP_KERNEL ); ah->host = host; ah->ohci = host->hostdata;INIT_LIST_HEAD (&ah->stream_list);
drivers/ieee1394/cmp.c +1 -1
@@ -159,7 +159,7 @@ static void cmp_add_host(struct hpsb_hos {struct cmp_host *ch; - ch =kmalloc (sizeof *ch,in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + ch =kmalloc (sizeof *ch,in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (ch ==NULL ) {HPSB_ERR ("Failed to allocate cmp_host" );return ;
drivers/ieee1394/eth1394.c +1 -1
@@ -360,7 +360,7 @@ static void ether1394_add_host (struct h priv->host = host; hi = (struct host_info *)kmalloc (sizeof (struct host_info ), -in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); +in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (hi ==NULL ) goto out;
drivers/ieee1394/hosts.c +1 -1
@@ -123,7 +123,7 @@ struct hpsb_host *hpsb_alloc_host(structstruct hpsb_host *h;int i; - h =kmalloc (sizeof (struct hpsb_host ) + extra,SLAB_KERNEL ); + h =kmalloc (sizeof (struct hpsb_host ) + extra,GFP_KERNEL );if (!h)return NULL ;memset (h,0 ,sizeof (struct hpsb_host ) + extra);
drivers/ieee1394/iso.c +1 -1
@@ -80,7 +80,7 @@ static struct hpsb_iso* hpsb_iso_common_/* allocate and write the struct hpsb_iso */ - iso =kmalloc (sizeof (*iso),SLAB_KERNEL ); + iso =kmalloc (sizeof (*iso),GFP_KERNEL );if (!iso)return NULL ;
drivers/ieee1394/nodemgr.c +1 -1
@@ -1325,7 +1325,7 @@ static void nodemgr_add_host(struct hpsbstruct host_info *hi;unsigned long flags; - hi =kmalloc (sizeof (struct host_info ),in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + hi =kmalloc (sizeof (struct host_info ),in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (!hi) {HPSB_ERR ("NodeMgr: out of memory in add host" );
drivers/ieee1394/ohci1394.c +6 -6
@@ -1056,7 +1056,7 @@ static int ohci_iso_recv_init(struct hpsint ctx;int ret = -ENOMEM ; - recv =kmalloc (sizeof (*recv),SLAB_KERNEL ); + recv =kmalloc (sizeof (*recv),GFP_KERNEL );if (!recv)return -ENOMEM ;
@@ -1416,7 +1416,7 @@ static int ohci_iso_xmit_init(struct hpsint ctx;int ret = -ENOMEM ; - xmit =kmalloc (sizeof (*xmit),SLAB_KERNEL ); + xmit =kmalloc (sizeof (*xmit),GFP_KERNEL );if (!xmit)return -ENOMEM ;
@@ -2394,7 +2394,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, } d->prg_pool =hpsb_pci_pool_create ("ohci1394 rcv prg" , ohci->dev, -sizeof (struct dma_cmd ),4 ,0 ,SLAB_KERNEL ); +sizeof (struct dma_cmd ),4 ,0 ,GFP_KERNEL );OHCI_DMA_ALLOC ("dma_rcv prg pool" );for (i=0 ; i<d->num_desc; i++) {
@@ -2412,7 +2412,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci,return -ENOMEM ; } - d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,SLAB_KERNEL , d->prg_bus+i); + d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,GFP_KERNEL , d->prg_bus+i);OHCI_DMA_ALLOC ("pool dma_rcv prg[%d]" , i);if (d->prg_cpu[i] !=NULL ) {
@@ -2503,11 +2503,11 @@ alloc_dma_trm_ctx(struct ti_ohci *ohci,memset (d->prg_bus,0 , d->num_desc *sizeof (dma_addr_t)); d->prg_pool =hpsb_pci_pool_create ("ohci1394 trm prg" , ohci->dev, -sizeof (struct at_dma_prg ),4 ,0 ,SLAB_KERNEL ); +sizeof (struct at_dma_prg ),4 ,0 ,GFP_KERNEL );OHCI_DMA_ALLOC ("dma_rcv prg pool" );for (i =0 ; i < d->num_desc; i++) { - d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,SLAB_KERNEL , d->prg_bus+i); + d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,GFP_KERNEL , d->prg_bus+i);OHCI_DMA_ALLOC ("pool dma_trm prg[%d]" , i);if (d->prg_cpu[i] !=NULL ) {
drivers/ieee1394/pcilynx.c +1 -1
@@ -865,7 +865,7 @@ static int mem_open(struct inode *inode, type = t_ram; } - md = (struct memdata *)kmalloc (sizeof (struct memdata ),SLAB_KERNEL ); + md = (struct memdata *)kmalloc (sizeof (struct memdata ),GFP_KERNEL );if (md ==NULL )return -ENOMEM ;
drivers/ieee1394/raw1394.c +22 -22
171 lines not on this page · raw message
drivers/ieee1394/sbp2.c +1 -1
@@ -1011,7 +1011,7 @@ static void sbp2_add_host(struct hpsb_ho/* Allocate some memory for our host info structure */ hi = (struct sbp2scsi_host_info *)kmalloc (sizeof (struct sbp2scsi_host_info ), -in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); +in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (hi ==NULL ) {SBP2_ERR ("out of memory in sbp2_add_host" );
drivers/pci/pool.c +4 -4
@@ -125,7 +125,7 @@ pci_pool_create (const char *name, struc }else if (allocation < size)return 0 ; -if (!(retval =kmalloc (sizeof *retval,SLAB_KERNEL ))) +if (!(retval =kmalloc (sizeof *retval,GFP_KERNEL )))return retval;strncpy (retval->name, name,sizeof retval->name);
@@ -249,7 +249,7 @@ pci_pool_destroy (struct pci_pool *pool)/** * pci_pool_alloc - get a block of consistent memory * @pool: pci pool that will produce the block -* @mem_flags: SLAB_KERNEL or SLAB_ATOMIC +* @mem_flags: GFP_KERNEL or GFP_ATOMIC * @handle: pointer to dma address of block * * This returns the kernel virtual address of a currently unused block,
@@ -286,8 +286,8 @@ restart: } } } -if (!(page =pool_alloc_page (pool,SLAB_ATOMIC ))) { -if (mem_flags ==SLAB_KERNEL ) { +if (!(page =pool_alloc_page (pool,GFP_ATOMIC ))) { +if (mem_flags ==GFP_KERNEL ) {DECLARE_WAITQUEUE (wait, current); current->state =TASK_INTERRUPTIBLE ;
drivers/usb/core/hub.c +1 -1
@@ -233,7 +233,7 @@ void usb_hub_tt_clear_buffer (struct usb* since each TT has "at least two" buffers that can need it (and * there can be many TTs per hub). even if they're uncommon. */ -if ((clear =kmalloc (sizeof *clear,SLAB_ATOMIC )) ==0 ) { +if ((clear =kmalloc (sizeof *clear,GFP_ATOMIC )) ==0 ) {err ("can't save CLEAR_TT_BUFFER state for hub at usb-%s-%s" , dev->bus->bus_name, tt->hub->devpath);/* FIXME recover somehow ... RESET_TT? */
drivers/usb/core/message.c +1 -1
@@ -439,7 +439,7 @@ void usb_sg_wait (struct usb_sg_requestfor (i =0 ; i < io->entries && !io->status; i++) {int retval; - retval =usb_submit_urb (io->urbs [i],SLAB_ATOMIC ); + retval =usb_submit_urb (io->urbs [i],GFP_ATOMIC );/* after we submit, let completions or cancelations fire; * we handshake using io->status.
drivers/usb/host/ehci-dbg.c +1 -1
@@ -429,7 +429,7 @@ show_periodic (struct device *dev, charchar *next;unsigned i, tag; -if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,SLAB_ATOMIC ))) +if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,GFP_ATOMIC )))return 0 ; seen_count =0 ;
drivers/usb/host/ehci-hcd.c +1 -1
@@ -361,7 +361,7 @@ static int ehci_start (struct usb_hcd *h* periodic_size can shrink by USBCMD update if hcc_params allows. */ ehci->periodic_size =DEFAULT_I_TDPS ; -if ((retval =ehci_mem_init (ehci,SLAB_KERNEL )) <0 ) +if ((retval =ehci_mem_init (ehci,GFP_KERNEL )) <0 )return retval;/* controllers may cache some of the periodic schedule ... */
drivers/usb/host/ehci-q.c +1 -1
@@ -756,7 +756,7 @@ static struct ehci_qh *qh_append_tds ( qh = (struct ehci_qh *) *ptr;if (unlikely (qh ==0 )) {/* can't sleep here, we have ehci->lock... */ - qh =qh_make (ehci, urb,SLAB_ATOMIC ); + qh =qh_make (ehci, urb,GFP_ATOMIC ); *ptr = qh; }if (likely (qh !=0 )) {
drivers/usb/host/ohci-dbg.c +1 -1
@@ -427,7 +427,7 @@ show_periodic (struct device *dev, charchar *next;unsigned i; -if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,SLAB_ATOMIC ))) +if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,GFP_ATOMIC )))return 0 ; seen_count =0 ;
drivers/usb/host/ohci-q.c +2 -2
@@ -362,7 +362,7 @@ static struct ed *ed_get (if (!(ed = dev->ep [ep])) {struct td *td; - ed =ed_alloc (ohci,SLAB_ATOMIC ); + ed =ed_alloc (ohci,GFP_ATOMIC );if (!ed) {/* out of memory */ goto done;
@@ -370,7 +370,7 @@ static struct ed *ed_get ( dev->ep [ep] = ed;/* dummy td; end of td list for ed */ - td =td_alloc (ohci,SLAB_ATOMIC ); + td =td_alloc (ohci,GFP_ATOMIC );if (!td) {/* out of memory */ ed_free (ohci, ed);
drivers/usb/host/uhci-hcd.c +1 -1
@@ -647,7 +647,7 @@ static struct urb_priv *uhci_alloc_urb_p {struct urb_priv *urbp; - urbp =kmem_cache_alloc (uhci_up_cachep,SLAB_ATOMIC ); + urbp =kmem_cache_alloc (uhci_up_cachep,GFP_ATOMIC );if (!urbp) {err ("uhci_alloc_urb_priv: couldn't allocate memory for urb_priv\n" );return NULL ;
drivers/usb/input/aiptek.c +1 -1
@@ -263,7 +263,7 @@ aiptek_probe(struct usb_interface *intf,memset (aiptek,0 ,sizeof (struct aiptek )); - aiptek->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &aiptek->data_dma); + aiptek->data =usb_buffer_alloc (dev,10 ,GFP_ATOMIC , &aiptek->data_dma);if (!aiptek->data) {kfree (aiptek);return -ENOMEM ;
drivers/usb/input/hid-core.c +5 -5
@@ -915,7 +915,7 @@ static void hid_irq_in(struct urb *urb,dbg ("nonzero status in input irq %d" , urb->status); } - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input%d, status %d", hid->dev->bus->bus_name, hid->dev->devpath,
@@ -1377,13 +1377,13 @@ struct hid_blacklist {static int hid_alloc_buffers (struct usb_device *dev,struct hid_device *hid) { -if (!(hid->inbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->inbuf_dma))) +if (!(hid->inbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->inbuf_dma)))return -1 ; -if (!(hid->outbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->outbuf_dma))) +if (!(hid->outbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->outbuf_dma)))return -1 ; -if (!(hid->cr =usb_buffer_alloc (dev,sizeof (*(hid->cr)),SLAB_ATOMIC , &hid->cr_dma))) +if (!(hid->cr =usb_buffer_alloc (dev,sizeof (*(hid->cr)),GFP_ATOMIC , &hid->cr_dma)))return -1 ; -if (!(hid->ctrlbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->ctrlbuf_dma))) +if (!(hid->ctrlbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->ctrlbuf_dma)))return -1 ;return 0 ;
drivers/usb/input/powermate.c +2 -2
@@ -270,11 +270,11 @@ static int powermate_input_event(structstatic int powermate_alloc_buffers (struct usb_device *udev,struct powermate_device *pm) { pm->data =usb_buffer_alloc (udev,POWERMATE_PAYLOAD_SIZE , -SLAB_ATOMIC , &pm->data_dma); +GFP_ATOMIC , &pm->data_dma);if (!pm->data)return -1 ; pm->configcr =usb_buffer_alloc (udev,sizeof (*(pm->configcr)), -SLAB_ATOMIC , &pm->configcr_dma); +GFP_ATOMIC , &pm->configcr_dma);if (!pm->configcr)return -1 ;
drivers/usb/input/usbkbd.c +4 -4
@@ -126,7 +126,7 @@ static void usb_kbd_irq(struct urb *urb,memcpy (kbd->old, kbd->new,8 ); resubmit: - i =usb_submit_urb (urb,SLAB_ATOMIC ); + i =usb_submit_urb (urb,GFP_ATOMIC );if (i) err ("can't resubmit intr, %s-%s/input0, status %d", kbd->usbdev->bus->bus_name,
@@ -204,11 +204,11 @@ static int usb_kbd_alloc_mem(struct usb_return -1 ;if (!(kbd->led =usb_alloc_urb (0 ,GFP_KERNEL )))return -1 ; -if (!(kbd->new =usb_buffer_alloc (dev,8 ,SLAB_ATOMIC , &kbd->new_dma))) +if (!(kbd->new =usb_buffer_alloc (dev,8 ,GFP_ATOMIC , &kbd->new_dma)))return -1 ; -if (!(kbd->cr =usb_buffer_alloc (dev,sizeof (struct usb_ctrlrequest ),SLAB_ATOMIC , &kbd->cr_dma))) +if (!(kbd->cr =usb_buffer_alloc (dev,sizeof (struct usb_ctrlrequest ),GFP_ATOMIC , &kbd->cr_dma)))return -1 ; -if (!(kbd->leds =usb_buffer_alloc (dev,1 ,SLAB_ATOMIC , &kbd->leds_dma))) +if (!(kbd->leds =usb_buffer_alloc (dev,1 ,GFP_ATOMIC , &kbd->leds_dma)))return -1 ;return 0 ;
drivers/usb/input/usbmouse.c +2 -2
@@ -90,7 +90,7 @@ static void usb_mouse_irq(struct urb *urinput_sync (dev); resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input0, status %d", mouse->usbdev->bus->bus_name,
@@ -149,7 +149,7 @@ static int usb_mouse_probe(struct usb_inreturn -ENOMEM ;memset (mouse,0 ,sizeof (struct usb_mouse )); - mouse->data =usb_buffer_alloc (dev,8 ,SLAB_ATOMIC , &mouse->data_dma); + mouse->data =usb_buffer_alloc (dev,8 ,GFP_ATOMIC , &mouse->data_dma);if (!mouse->data) {kfree (mouse);return -ENOMEM ;
drivers/usb/input/wacom.c +1 -1
@@ -507,7 +507,7 @@ static int wacom_probe(struct usb_interfreturn -ENOMEM ;memset (wacom,0 ,sizeof (struct wacom )); - wacom->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &wacom->data_dma); + wacom->data =usb_buffer_alloc (dev,10 ,GFP_ATOMIC , &wacom->data_dma);if (!wacom->data) {kfree (wacom);return -ENOMEM ;
drivers/usb/input/xpad.c +1 -1
@@ -239,7 +239,7 @@ static int xpad_probe(struct usb_interfamemset (xpad,0 ,sizeof (struct usb_xpad )); xpad->idata =usb_buffer_alloc (udev,XPAD_PKT_LEN , -SLAB_ATOMIC , &xpad->idata_dma); +GFP_ATOMIC , &xpad->idata_dma);if (!xpad->idata) {kfree (xpad);return -ENOMEM ;
drivers/usb/misc/usbtest.c +14 -14
@@ -100,7 +100,7 @@ static struct urb *simple_alloc_urb (if (bytes <0 )return 0 ; - urb =usb_alloc_urb (0 ,SLAB_KERNEL ); + urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!urb)return urb;usb_fill_bulk_urb (urb, udev, pipe,0 , bytes, simple_callback,0 );
@@ -110,7 +110,7 @@ static struct urb *simple_alloc_urb ( urb->transfer_flags =URB_NO_DMA_MAP ;if (usb_pipein (pipe)) urb->transfer_flags |=URB_SHORT_NOT_OK ; - urb->transfer_buffer =usb_buffer_alloc (udev, bytes,SLAB_KERNEL , + urb->transfer_buffer =usb_buffer_alloc (udev, bytes,GFP_KERNEL , &urb->transfer_dma);if (!urb->transfer_buffer) {usb_free_urb (urb);
@@ -141,7 +141,7 @@ static int simple_io ( urb->context = &completion;while (retval ==0 && iterations-- >0 ) {init_completion (&completion); -if ((retval =usb_submit_urb (urb,SLAB_KERNEL )) !=0 ) +if ((retval =usb_submit_urb (urb,GFP_KERNEL )) !=0 )break ;/* NOTE: no timeouts; can't be broken out of by interrupt */
@@ -198,7 +198,7 @@ alloc_sglist (int nents, int max, int vaunsigned i;unsigned size = max; - sg =kmalloc (nents *sizeof *sg,SLAB_KERNEL ); + sg =kmalloc (nents *sizeof *sg,GFP_KERNEL );if (!sg)return 0 ;memset (sg,0 , nents *sizeof *sg);
@@ -206,7 +206,7 @@ alloc_sglist (int nents, int max, int vafor (i =0 ; i < nents; i++) {char *buf; - buf =kmalloc (size,SLAB_KERNEL ); + buf =kmalloc (size,GFP_KERNEL );if (!buf) {free_sglist (sg, i);return 0 ;
@@ -245,7 +245,7 @@ static int perform_sglist ( (udev->speed ==USB_SPEED_HIGH ) ? (INTERRUPT_RATE <<3 ) :INTERRUPT_RATE , - sg, nents, 0, SLAB_KERNEL); + sg, nents, 0, GFP_KERNEL);if (retval)break ;
@@ -658,7 +658,7 @@ error:/* resubmit if we need to, else mark this as done */ if ((status ==0 ) && (ctx->pending < ctx->count)) { -if ((status =usb_submit_urb (urb,SLAB_ATOMIC )) !=0 ) { +if ((status =usb_submit_urb (urb,GFP_ATOMIC )) !=0 ) {dbg ("can't resubmit ctrl %02x.%02x, err %d" , reqp->bRequestType, reqp->bRequest, status); urb->dev =0 ;
@@ -693,7 +693,7 @@ test_ctrl_queue (struct usbtest_dev *dev* as with bulk/intr sglists, sglen is the queue depth; it also * controls which subtests run (more tests than sglen) or rerun. */ - urb =kmalloc (param->sglen *sizeof (struct urb *),SLAB_KERNEL ); + urb =kmalloc (param->sglen *sizeof (struct urb *),GFP_KERNEL );if (!urb) goto cleanup;memset (urb,0 , param->sglen *sizeof (struct urb *));
@@ -793,7 +793,7 @@ test_ctrl_queue (struct usbtest_dev *devif (!u) goto cleanup; - reqp =usb_buffer_alloc (udev,sizeof req,SLAB_KERNEL , + reqp =usb_buffer_alloc (udev,sizeof req,GFP_KERNEL , &u->setup_dma);if (!reqp) goto cleanup;
@@ -809,7 +809,7 @@ test_ctrl_queue (struct usbtest_dev *dev context.urb = urb;spin_lock_irq (&context.lock);for (i =0 ; i < param->sglen; i++) { - context.status =usb_submit_urb (urb [i],SLAB_ATOMIC ); + context.status =usb_submit_urb (urb [i],GFP_ATOMIC );if (context.status !=0 ) {dbg ("can't submit urb[%d], status %d" , i, context.status);
@@ -849,7 +849,7 @@ static void unlink1_callback (struct urb// we "know" -EPIPE (stall) never happens if (!status) - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) {if (status == -ECONNRESET || status == -ENOENT ) status =0 ;
@@ -877,7 +877,7 @@ static int unlink1 (struct usbtest_dev ** FIXME want additional tests for when endpoint is STALLing * due to errors, or is just NAKing requests. */ -if ((retval =usb_submit_urb (urb,SLAB_KERNEL )) !=0 ) { +if ((retval =usb_submit_urb (urb,GFP_KERNEL )) !=0 ) {dbg ("submit/unlink fail %d" , retval);return retval; }
@@ -1214,7 +1214,7 @@ usbtest_probe (struct usb_interface *int }#endif - dev =kmalloc (sizeof *dev,SLAB_KERNEL ); + dev =kmalloc (sizeof *dev,GFP_KERNEL );if (!dev)return -ENOMEM ;memset (dev,0 ,sizeof *dev);
@@ -1229,7 +1229,7 @@ usbtest_probe (struct usb_interface *int dev->intf = intf;/* cacheline-aligned scratch for i/o */ -if ((dev->buf =kmalloc (TBUF_SIZE ,SLAB_KERNEL )) ==0 ) { +if ((dev->buf =kmalloc (TBUF_SIZE ,GFP_KERNEL )) ==0 ) {kfree (dev);return -ENOMEM ; }
drivers/usb/net/catc.c +1 -1
@@ -343,7 +343,7 @@ static void catc_irq_done(struct urb *ur } } resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s, status %d", catc->usbdev->bus->bus_name,
drivers/usb/net/kaweth.c +1 -1
@@ -499,7 +499,7 @@ static void int_callback(struct urb *u, kaweth->linkstate = act_state; } resubmit: - status =usb_submit_urb (u,SLAB_ATOMIC ); + status =usb_submit_urb (u,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s, status %d", kaweth->dev->bus->bus_name,
drivers/usb/net/pegasus.c +1 -1
@@ -719,7 +719,7 @@ static void intr_callback(struct urb *ur } } - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status)err ("%s: can't resubmit interrupt urb, %d" , net->name, status); }
drivers/usb/net/rtl8150.c +1 -1
@@ -475,7 +475,7 @@ void intr_callback(struct urb *urb, stru/* FIXME if this doesn't do anything, don't submit the urb! */ resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input0, status %d", dev->udev->bus->bus_name,
fs/adfs/super.c +1 -1
@@ -210,7 +210,7 @@ static kmem_cache_t *adfs_inode_cachep;static struct inode *adfs_alloc_inode (struct super_block *sb) {struct adfs_inode_info *ei; - ei = (struct adfs_inode_info *)kmem_cache_alloc (adfs_inode_cachep,SLAB_KERNEL ); + ei = (struct adfs_inode_info *)kmem_cache_alloc (adfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/affs/super.c +1 -1
@@ -89,7 +89,7 @@ static kmem_cache_t * affs_inode_cachep;static struct inode *affs_alloc_inode (struct super_block *sb) {struct affs_inode_info *ei; - ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,SLAB_KERNEL ); + ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
fs/afs/super.c +1 -1
@@ -484,7 +484,7 @@ static struct inode *afs_alloc_inode(str {afs_vnode_t *vnode; - vnode = (afs_vnode_t *)kmem_cache_alloc (afs_inode_cachep,SLAB_KERNEL ); + vnode = (afs_vnode_t *)kmem_cache_alloc (afs_inode_cachep,GFP_KERNEL );if (!vnode)return NULL ;
fs/befs/linuxvfs.c +1 -1
@@ -282,7 +282,7 @@ befs_alloc_inode(struct super_block *sb) {struct befs_inode_info *bi; bi = (struct befs_inode_info *)kmem_cache_alloc (befs_inode_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (!bi)return NULL ;return &bi->vfs_inode;
fs/bfs/inode.c +1 -1
@@ -219,7 +219,7 @@ static kmem_cache_t * bfs_inode_cachep;static struct inode *bfs_alloc_inode (struct super_block *sb) {struct bfs_inode_info *bi; - bi =kmem_cache_alloc (bfs_inode_cachep,SLAB_KERNEL ); + bi =kmem_cache_alloc (bfs_inode_cachep,GFP_KERNEL );if (!bi)return NULL ;return &bi->vfs_inode;
fs/block_dev.c +1 -1
@@ -223,7 +223,7 @@ static spinlock_t bdev_lock __cacheline_static kmem_cache_t * bdev_cachep;#define alloc_bdev () \ - ((struct block_device *) kmem_cache_alloc(bdev_cachep, SLAB_KERNEL)) + ((struct block_device *) kmem_cache_alloc(bdev_cachep, GFP_KERNEL))#define destroy_bdev (bdev) kmem_cache_free(bdev_cachep, (bdev))static void init_once (void * foo,kmem_cache_t * cachep,unsigned long flags)
fs/char_dev.c +1 -1
@@ -35,7 +35,7 @@ static spinlock_t cdev_lock = SPIN_LOCK_static kmem_cache_t * cdev_cachep;#define alloc_cdev () \ - ((struct char_device *) kmem_cache_alloc(cdev_cachep, SLAB_KERNEL)) + ((struct char_device *) kmem_cache_alloc(cdev_cachep, GFP_KERNEL))#define destroy_cdev (cdev) kmem_cache_free(cdev_cachep, (cdev))static void init_once (void *foo,kmem_cache_t *cachep,unsigned long flags)
fs/cifs/cifsfs.c +1 -1
@@ -174,7 +174,7 @@ cifs_alloc_inode(struct super_block *sb)struct cifsInodeInfo *cifs_inode; cifs_inode = (struct cifsInodeInfo *)kmem_cache_alloc (cifs_inode_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (!cifs_inode)return NULL ; cifs_inode->cifsAttrs =0x20 ;/* default */
fs/cifs/misc.c +1 -1
@@ -153,7 +153,7 @@ buf_get(void)but it may be more efficient to always alloc same size albeit slightly larger */ ret_buf = - (struct smb_hdr *)kmem_cache_alloc (cifs_req_cachep,SLAB_KERNEL ); + (struct smb_hdr *)kmem_cache_alloc (cifs_req_cachep,GFP_KERNEL );/* clear the first few header bytes */ if (ret_buf) {
fs/cifs/transport.c +1 -1
@@ -45,7 +45,7 @@ AllocMidQEntry(struct smb_hdr *smb_buffe } temp =kmalloc (sizeof (struct mid_q_entry ),GFP_KERNEL ); temp = (struct mid_q_entry *)kmem_cache_alloc (cifs_mid_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (temp ==NULL )return temp;else {
fs/coda/inode.c +1 -1
@@ -41,7 +41,7 @@ static kmem_cache_t * coda_inode_cachep;static struct inode *coda_alloc_inode (struct super_block *sb) {struct coda_inode_info *ei; - ei = (struct coda_inode_info *)kmem_cache_alloc (coda_inode_cachep,SLAB_KERNEL ); + ei = (struct coda_inode_info *)kmem_cache_alloc (coda_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;memset (&ei->c_fid,0 ,sizeof (struct ViceFid ));
fs/devfs/base.c +2 -2
@@ -577,7 +577,7 @@ Added process group check for devfsd privileges. v1.4 20011204 Richard Gooch <[email protected]> - Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. + Use GFP_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. v1.5 20011211 Richard Gooch <[email protected]> Return old entry in <devfs_mk_dir> for 2.4.x kernels.
@@ -1407,7 +1407,7 @@ static int devfsd_notify_de (struct devfif ( !( fs_info->devfsd_event_mask & (1 << type) ) )return (FALSE);if ( ( entry =kmem_cache_alloc (devfsd_buf_cache, - atomic ?SLAB_ATOMIC :SLAB_KERNEL ) ) + atomic ?GFP_ATOMIC :GFP_KERNEL ) ) ==NULL ) {atomic_inc (&fs_info->devfsd_overrun_count);
fs/dnotify.c +1 -1
@@ -79,7 +79,7 @@ int fcntl_dirnotify(int fd, struct file inode = filp->f_dentry->d_inode;if (!S_ISDIR (inode->i_mode))return -ENOTDIR ; - dn =kmem_cache_alloc (dn_cache,SLAB_KERNEL ); + dn =kmem_cache_alloc (dn_cache,GFP_KERNEL );if (dn ==NULL )return -ENOMEM ;write_lock (&dn_lock);
fs/dquot.c +1 -1
@@ -474,7 +474,7 @@ static struct dquot *get_empty_dquot(str {struct dquot *dquot; - dquot =kmem_cache_alloc (dquot_cachep,SLAB_KERNEL ); + dquot =kmem_cache_alloc (dquot_cachep,GFP_KERNEL );if (!dquot)return NODQUOT ;
fs/efs/super.c +1 -1
@@ -34,7 +34,7 @@ static kmem_cache_t * efs_inode_cachep;static struct inode *efs_alloc_inode (struct super_block *sb) {struct efs_inode_info *ei; - ei = (struct efs_inode_info *)kmem_cache_alloc (efs_inode_cachep,SLAB_KERNEL ); + ei = (struct efs_inode_info *)kmem_cache_alloc (efs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/eventpoll.c +2 -2
@@ -81,13 +81,13 @@ ((1 << (hbits)) % EP_HENTRY_X_PAGE ? 1: 0)))/* Macro to allocate a "struct epitem" from the slab cache */ -#define EPI_MEM_ALLOC () (struct epitem *) kmem_cache_alloc(epi_cache, SLAB_KERNEL) +#define EPI_MEM_ALLOC () (struct epitem *) kmem_cache_alloc(epi_cache, GFP_KERNEL)/* Macro to free a "struct epitem" to the slab cache */ #define EPI_MEM_FREE (p) kmem_cache_free(epi_cache, p)/* Macro to allocate a "struct eppoll_entry" from the slab cache */ -#define PWQ_MEM_ALLOC () (struct eppoll_entry *) kmem_cache_alloc(pwq_cache, SLAB_KERNEL) +#define PWQ_MEM_ALLOC () (struct eppoll_entry *) kmem_cache_alloc(pwq_cache, GFP_KERNEL)/* Macro to free a "struct eppoll_entry" to the slab cache */ #define PWQ_MEM_FREE (p) kmem_cache_free(pwq_cache, p)
fs/exec.c +1 -1
@@ -388,7 +388,7 @@ int setup_arg_pages(struct linux_binprm bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
fs/ext2/super.c +1 -1
@@ -154,7 +154,7 @@ static kmem_cache_t * ext2_inode_cachep;static struct inode *ext2_alloc_inode (struct super_block *sb) {struct ext2_inode_info *ei; - ei = (struct ext2_inode_info *)kmem_cache_alloc (ext2_inode_cachep,SLAB_KERNEL ); + ei = (struct ext2_inode_info *)kmem_cache_alloc (ext2_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;#ifdef CONFIG_EXT2_FS_POSIX_ACL
fs/fat/inode.c +1 -1
@@ -672,7 +672,7 @@ static kmem_cache_t *fat_inode_cachep;static struct inode *fat_alloc_inode (struct super_block *sb) {struct msdos_inode_info *ei; - ei = (struct msdos_inode_info *)kmem_cache_alloc (fat_inode_cachep,SLAB_KERNEL ); + ei = (struct msdos_inode_info *)kmem_cache_alloc (fat_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/fcntl.c +1 -1
@@ -550,7 +550,7 @@ int fasync_helper(int fd, struct file *int result =0 ;if (on) { - new =kmem_cache_alloc (fasync_cache,SLAB_KERNEL ); + new =kmem_cache_alloc (fasync_cache,GFP_KERNEL );if (!new)return -ENOMEM ; }
fs/file_table.c +1 -1
@@ -74,7 +74,7 @@ struct file * get_empty_filp(void)*/ if (files_stat.nr_files < files_stat.max_files) {file_list_unlock (); - f =kmem_cache_alloc (filp_cachep,SLAB_KERNEL ); + f =kmem_cache_alloc (filp_cachep,GFP_KERNEL );file_list_lock ();if (f) { files_stat.nr_files++;
fs/freevxfs/vxfs_fshead.c +1 -1
@@ -83,7 +83,7 @@ vxfs_getfsh(struct inode *ip, int which)if (buffer_mapped (bp)) {struct vxfs_fsh *fhp; -if (!(fhp =kmalloc (sizeof (*fhp),SLAB_KERNEL ))) +if (!(fhp =kmalloc (sizeof (*fhp),GFP_KERNEL )))return NULL ;memcpy (fhp, bp->b_data,sizeof (*fhp));
fs/freevxfs/vxfs_inode.c +2 -2
@@ -114,7 +114,7 @@ vxfs_blkiget(struct super_block *sbp, u_struct vxfs_inode_info *vip;struct vxfs_dinode *dip; -if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,SLAB_KERNEL ))) +if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,GFP_KERNEL ))) goto fail; dip = (struct vxfs_dinode *)(bp->b_data + offset);memcpy (vip, dip,sizeof (*vip));
@@ -156,7 +156,7 @@ __vxfs_iget(ino_t ino, struct inode *ilistruct vxfs_dinode *dip;caddr_t kaddr = (char *)page_address (pp); -if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,SLAB_KERNEL ))) +if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,GFP_KERNEL ))) goto fail; dip = (struct vxfs_dinode *)(kaddr + offset);memcpy (vip, dip,sizeof (*vip));
fs/hfs/super.c +1 -1
@@ -48,7 +48,7 @@ static kmem_cache_t * hfs_inode_cachep;static struct inode *hfs_alloc_inode (struct super_block *sb) {struct hfs_inode_info *ei; - ei = (struct hfs_inode_info *)kmem_cache_alloc (hfs_inode_cachep,SLAB_KERNEL ); + ei = (struct hfs_inode_info *)kmem_cache_alloc (hfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/hpfs/super.c +1 -1
@@ -164,7 +164,7 @@ static kmem_cache_t * hpfs_inode_cachep;static struct inode *hpfs_alloc_inode (struct super_block *sb) {struct hpfs_inode_info *ei; - ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,SLAB_KERNEL ); + ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
fs/inode.c +1 -1
@@ -97,7 +97,7 @@ static struct inode *alloc_inode(structif (sb->s_op->alloc_inode) inode = sb->s_op->alloc_inode (sb);else - inode = (struct inode *)kmem_cache_alloc (inode_cachep,SLAB_KERNEL ); + inode = (struct inode *)kmem_cache_alloc (inode_cachep,GFP_KERNEL );if (inode) {struct address_space *const mapping = &inode->i_data;
fs/intermezzo/dcache.c +1 -1
@@ -234,7 +234,7 @@ inline struct presto_dentry_data *izo_al {struct presto_dentry_data *dd; - dd =kmem_cache_alloc (presto_dentry_slab,SLAB_KERNEL ); + dd =kmem_cache_alloc (presto_dentry_slab,GFP_KERNEL );if (dd ==NULL ) {CERROR ("IZO: out of memory trying to allocate presto_dentry_data\n" );return NULL ;
fs/isofs/inode.c +1 -1
@@ -81,7 +81,7 @@ static kmem_cache_t *isofs_inode_cachep;static struct inode *isofs_alloc_inode (struct super_block *sb) {struct iso_inode_info *ei; - ei = (struct iso_inode_info *)kmem_cache_alloc (isofs_inode_cachep,SLAB_KERNEL ); + ei = (struct iso_inode_info *)kmem_cache_alloc (isofs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/jffs/jffs_fm.c +2 -2
@@ -706,7 +706,7 @@ struct jffs_fm *jffs_alloc_fm(void) {struct jffs_fm *fm; - fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); + fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); DJM(if (fm) no_jffs_fm++;);return fm;
@@ -724,7 +724,7 @@ struct jffs_node *jffs_alloc_node(void) {struct jffs_node *n; - n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL ); + n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL );if (n !=NULL ) no_jffs_node++;return n;
fs/jffs2/super.c +1 -1
@@ -36,7 +36,7 @@ static kmem_cache_t *jffs2_inode_cachep;static struct inode *jffs2_alloc_inode (struct super_block *sb) {struct jffs2_inode_info *ei; - ei = (struct jffs2_inode_info *)kmem_cache_alloc (jffs2_inode_cachep,SLAB_KERNEL ); + ei = (struct jffs2_inode_info *)kmem_cache_alloc (jffs2_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/locks.c +1 -1
@@ -148,7 +148,7 @@ static struct file_lock *locks_alloc_locstruct file_lock *fl;if (account && current->locks >= current->rlim[RLIMIT_LOCKS ].rlim_cur)return NULL ; - fl =kmem_cache_alloc (filelock_cache,SLAB_KERNEL ); + fl =kmem_cache_alloc (filelock_cache,GFP_KERNEL );if (fl) current->locks++;return fl;
fs/minix/inode.c +1 -1
@@ -55,7 +55,7 @@ static kmem_cache_t * minix_inode_cachepstatic struct inode *minix_alloc_inode (struct super_block *sb) {struct minix_inode_info *ei; - ei = (struct minix_inode_info *)kmem_cache_alloc (minix_inode_cachep,SLAB_KERNEL ); + ei = (struct minix_inode_info *)kmem_cache_alloc (minix_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/ncpfs/inode.c +1 -1
@@ -46,7 +46,7 @@ static kmem_cache_t * ncp_inode_cachep;static struct inode *ncp_alloc_inode (struct super_block *sb) {struct ncp_inode_info *ei; - ei = (struct ncp_inode_info *)kmem_cache_alloc (ncp_inode_cachep,SLAB_KERNEL ); + ei = (struct ncp_inode_info *)kmem_cache_alloc (ncp_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/nfs/inode.c +1 -1
@@ -1520,7 +1520,7 @@ static kmem_cache_t * nfs_inode_cachep;static struct inode *nfs_alloc_inode (struct super_block *sb) {struct nfs_inode *nfsi; - nfsi = (struct nfs_inode *)kmem_cache_alloc (nfs_inode_cachep,SLAB_KERNEL ); + nfsi = (struct nfs_inode *)kmem_cache_alloc (nfs_inode_cachep,GFP_KERNEL );if (!nfsi)return NULL ; nfsi->flags =0 ;
fs/proc/inode.c +1 -1
@@ -92,7 +92,7 @@ static struct inode *proc_alloc_inode(ststruct proc_inode *ei;struct inode *inode; - ei = (struct proc_inode *)kmem_cache_alloc (proc_inode_cachep,SLAB_KERNEL ); + ei = (struct proc_inode *)kmem_cache_alloc (proc_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->task =NULL ;
fs/qnx4/inode.c +1 -1
@@ -515,7 +515,7 @@ static kmem_cache_t *qnx4_inode_cachep;static struct inode *qnx4_alloc_inode (struct super_block *sb) {struct qnx4_inode_info *ei; - ei =kmem_cache_alloc (qnx4_inode_cachep,SLAB_KERNEL ); + ei =kmem_cache_alloc (qnx4_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/reiserfs/super.c +1 -1
@@ -414,7 +414,7 @@ static kmem_cache_t * reiserfs_inode_cacstatic struct inode *reiserfs_alloc_inode (struct super_block *sb) {struct reiserfs_inode_info *ei; - ei = (struct reiserfs_inode_info *)kmem_cache_alloc (reiserfs_inode_cachep,SLAB_KERNEL ); + ei = (struct reiserfs_inode_info *)kmem_cache_alloc (reiserfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/romfs/inode.c +1 -1
@@ -554,7 +554,7 @@ static kmem_cache_t * romfs_inode_cachepstatic struct inode *romfs_alloc_inode (struct super_block *sb) {struct romfs_inode_info *ei; - ei = (struct romfs_inode_info *)kmem_cache_alloc (romfs_inode_cachep,SLAB_KERNEL ); + ei = (struct romfs_inode_info *)kmem_cache_alloc (romfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/smbfs/inode.c +1 -1
@@ -55,7 +55,7 @@ static kmem_cache_t *smb_inode_cachep;static struct inode *smb_alloc_inode (struct super_block *sb) {struct smb_inode_info *ei; - ei = (struct smb_inode_info *)kmem_cache_alloc (smb_inode_cachep,SLAB_KERNEL ); + ei = (struct smb_inode_info *)kmem_cache_alloc (smb_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/smbfs/request.c +1 -1
@@ -60,7 +60,7 @@ static struct smb_request *smb_do_alloc_struct smb_request *req;unsigned char *buf =NULL ; - req =kmem_cache_alloc (req_cachep,SLAB_KERNEL ); + req =kmem_cache_alloc (req_cachep,GFP_KERNEL );VERBOSE ("allocating request: %p\n" , req);if (!req) goto out;
fs/sysv/inode.c +1 -1
@@ -293,7 +293,7 @@ static struct inode *sysv_alloc_inode(st {struct sysv_inode_info *si; - si =kmem_cache_alloc (sysv_inode_cachep,SLAB_KERNEL ); + si =kmem_cache_alloc (sysv_inode_cachep,GFP_KERNEL );if (!si)return NULL ;return &si->vfs_inode;
fs/udf/super.c +1 -1
@@ -117,7 +117,7 @@ static kmem_cache_t * udf_inode_cachep;static struct inode *udf_alloc_inode (struct super_block *sb) {struct udf_inode_info *ei; - ei = (struct udf_inode_info *)kmem_cache_alloc (udf_inode_cachep,SLAB_KERNEL ); + ei = (struct udf_inode_info *)kmem_cache_alloc (udf_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/ufs/super.c +1 -1
@@ -1004,7 +1004,7 @@ static kmem_cache_t * ufs_inode_cachep;static struct inode *ufs_alloc_inode (struct super_block *sb) {struct ufs_inode_info *ei; - ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,SLAB_KERNEL ); + ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
include/linux/fs.h +1 -1
@@ -1026,7 +1026,7 @@ extern char * getname(const char *);/* fs/dcache.c */ extern void vfs_caches_init (unsigned long ); -#define __getname () kmem_cache_alloc(names_cachep, SLAB_KERNEL) +#define __getname () kmem_cache_alloc(names_cachep, GFP_KERNEL)#define putname (name) kmem_cache_free(names_cachep, (void *)(name))enum {BDEV_FILE ,BDEV_SWAP ,BDEV_FS ,BDEV_RAW };
include/linux/slab.h +0 -2
@@ -17,9 +17,7 @@ typedef struct kmem_cache_s kmem_cache_t/* flags for kmem_cache_alloc() */ #define SLAB_NOFS GFP_NOFS#define SLAB_NOIO GFP_NOIO -#define SLAB_ATOMIC GFP_ATOMIC#define SLAB_USER GFP_USER -#define SLAB_KERNEL GFP_KERNEL#define SLAB_DMA GFP_DMA#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN)
include/net/tcp.h +1 -1
@@ -539,7 +539,7 @@ struct open_request {/* SLAB cache for open requests. */ extern kmem_cache_t *tcp_openreq_cachep; -#define tcp_openreq_alloc () kmem_cache_alloc(tcp_openreq_cachep, SLAB_ATOMIC) +#define tcp_openreq_alloc () kmem_cache_alloc(tcp_openreq_cachep, GFP_ATOMIC)#define tcp_openreq_fastfree (req) kmem_cache_free(tcp_openreq_cachep, req)static inline void tcp_openreq_free (struct open_request *req)
kernel/fork.c +3 -3
@@ -261,7 +261,7 @@ static inline int dup_mmap(struct mm_str goto fail_nomem; charge += len; } - tmp =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + tmp =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!tmp) goto fail_nomem; *tmp = *mpnt;
@@ -333,7 +333,7 @@ static inline void mm_free_pgd(struct mm spinlock_t mmlist_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;int mmlist_nr; -#define allocate_mm () (kmem_cache_alloc(mm_cachep, SLAB_KERNEL)) +#define allocate_mm () (kmem_cache_alloc(mm_cachep, GFP_KERNEL))#define free_mm (mm) (kmem_cache_free(mm_cachep, (mm)))#include <linux/init_task.h>
@@ -576,7 +576,7 @@ static int copy_files(unsigned long clon tsk->files =NULL ; error = -ENOMEM ; - newf =kmem_cache_alloc (files_cachep,SLAB_KERNEL ); + newf =kmem_cache_alloc (files_cachep,GFP_KERNEL );if (!newf) goto out;
kernel/user.c +1 -1
@@ -90,7 +90,7 @@ struct user_struct * alloc_uid(uid_t uidif (!up) {struct user_struct *new; - new =kmem_cache_alloc (uid_cachep,SLAB_KERNEL ); + new =kmem_cache_alloc (uid_cachep,GFP_KERNEL );if (!new)return NULL ; new->uid = uid;
mm/mmap.c +3 -3
@@ -643,7 +643,7 @@ munmap_back:* specific mapper. the address has already been validated, but * not unmapped, but the maps are removed from the list. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL ); error = -ENOMEM ;if (!vma) goto unacct_error;
@@ -1179,7 +1179,7 @@ int split_vma(struct mm_struct * mm, strif (mm->map_count >=MAX_MAP_COUNT )return -ENOMEM ; - new =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + new =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!new)return -ENOMEM ;
@@ -1346,7 +1346,7 @@ unsigned long do_brk(unsigned long addr,/* * create a vma struct for an anonymous mapping */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!vma) {vm_unacct_memory (len >>PAGE_SHIFT );return -ENOMEM ;
mm/mremap.c +1 -1
@@ -237,7 +237,7 @@ static unsigned long move_vma(struct vm_ allocated_vma =0 ;if (!new_vma) { - new_vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + new_vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!new_vma) goto out; allocated_vma =1 ;
mm/shmem.c +1 -1
@@ -1760,7 +1760,7 @@ static kmem_cache_t *shmem_inode_cachep;static struct inode *shmem_alloc_inode (struct super_block *sb) {struct shmem_inode_info *p; - p = (struct shmem_inode_info *)kmem_cache_alloc (shmem_inode_cachep,SLAB_KERNEL ); + p = (struct shmem_inode_info *)kmem_cache_alloc (shmem_inode_cachep,GFP_KERNEL );if (!p)return NULL ;return &p->vfs_inode;
mm/slab.c +1 -1
@@ -904,7 +904,7 @@ kmem_cache_create (const char *name, sizBUG ();/* Get cache's description obj. */ - cachep = (kmem_cache_t *)kmem_cache_alloc (&cache_cache,SLAB_KERNEL ); + cachep = (kmem_cache_t *)kmem_cache_alloc (&cache_cache,GFP_KERNEL );if (!cachep) goto opps;memset (cachep,0 ,sizeof (kmem_cache_t));
net/core/dst.c +1 -1
@@ -119,7 +119,7 @@ void * dst_alloc(struct dst_ops * ops)if (ops->gc ())return NULL ; } - dst =kmem_cache_alloc (ops->kmem_cachep,SLAB_ATOMIC ); + dst =kmem_cache_alloc (ops->kmem_cachep,GFP_ATOMIC );if (!dst)return NULL ;memset (dst,0 , ops->entry_size);
net/core/neighbour.c +1 -1
@@ -232,7 +232,7 @@ static struct neighbour *neigh_alloc(str goto out; } - n =kmem_cache_alloc (tbl->kmem_cachep,SLAB_ATOMIC ); + n =kmem_cache_alloc (tbl->kmem_cachep,GFP_ATOMIC );if (!n) goto out;
net/decnet/dn_table.c +1 -1
@@ -530,7 +530,7 @@ create: replace: err = -ENOBUFS ; - new_f =kmem_cache_alloc (dn_hash_kmem,SLAB_KERNEL ); + new_f =kmem_cache_alloc (dn_hash_kmem,GFP_KERNEL );if (new_f ==NULL ) goto out;
net/ipv4/fib_hash.c +1 -1
@@ -561,7 +561,7 @@ create: replace: err = -ENOBUFS ; - new_f =kmem_cache_alloc (fn_hash_kmem,SLAB_KERNEL ); + new_f =kmem_cache_alloc (fn_hash_kmem,GFP_KERNEL );if (new_f ==NULL ) goto out;
net/ipv4/tcp_ipv4.c +1 -1
@@ -129,7 +129,7 @@ struct tcp_bind_bucket *tcp_bucket_creat unsigned short snum) {struct tcp_bind_bucket *tb =kmem_cache_alloc (tcp_bucket_cachep, -SLAB_ATOMIC ); +GFP_ATOMIC );if (tb) { tb->port = snum; tb->fastreuse =0 ;
net/ipv4/tcp_minisocks.c +1 -1
@@ -354,7 +354,7 @@ void tcp_time_wait(struct sock *sk, int recycle_ok = tp->af_specific->remember_stamp (sk);if (tcp_tw_count < sysctl_tcp_max_tw_buckets) - tw =kmem_cache_alloc (tcp_timewait_cachep,SLAB_ATOMIC ); + tw =kmem_cache_alloc (tcp_timewait_cachep,GFP_ATOMIC );if (tw !=NULL ) {struct inet_opt *inet =inet_sk (sk);
net/ipv4/xfrm_input.c +1 -1
@@ -108,7 +108,7 @@ int xfrm4_rcv(struct sk_buff *skb)if (!skb->sp ||atomic_read (&skb->sp->refcnt) !=1 ) {struct sec_path *sp; - sp =kmem_cache_alloc (secpath_cachep,SLAB_ATOMIC ); + sp =kmem_cache_alloc (secpath_cachep,GFP_ATOMIC );if (!sp) goto drop;if (skb->sp) {
net/ipv4/xfrm_policy.c +1 -1
@@ -115,7 +115,7 @@ struct xfrm_policy *flow_lookup(int dir,if (flow_count (cpu) > flow_hwm)flow_cache_shrink (cpu); - fle =kmem_cache_alloc (flow_cachep,SLAB_ATOMIC ); + fle =kmem_cache_alloc (flow_cachep,GFP_ATOMIC );if (fle) {flow_count (cpu)++; fle->fl = *fl;
net/ipv6/ip6_fib.c +1 -1
@@ -211,7 +211,7 @@ static __inline__ struct fib6_node * nod {struct fib6_node *fn; -if ((fn =kmem_cache_alloc (fib6_node_kmem,SLAB_ATOMIC )) !=NULL ) +if ((fn =kmem_cache_alloc (fib6_node_kmem,GFP_ATOMIC )) !=NULL )memset (fn,0 ,sizeof (struct fib6_node ));return fn;
net/socket.c +1 -1
@@ -274,7 +274,7 @@ static kmem_cache_t * sock_inode_cachep;static struct inode *sock_alloc_inode (struct super_block *sb) {struct socket_alloc *ei; - ei = (struct socket_alloc *)kmem_cache_alloc (sock_inode_cachep,SLAB_KERNEL ); + ei = (struct socket_alloc *)kmem_cache_alloc (sock_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;init_waitqueue_head (&ei->socket.wait);
net/sunrpc/rpc_pipe.c +1 -1
@@ -108,7 +108,7 @@ static struct inode * rpc_alloc_inode(struct super_block *sb) {struct rpc_inode *rpci; - rpci = (struct rpc_inode *)kmem_cache_alloc (rpc_inode_cachep,SLAB_KERNEL ); + rpci = (struct rpc_inode *)kmem_cache_alloc (rpc_inode_cachep,GFP_KERNEL );if (!rpci)return NULL ;return &rpci->vfs_inode;
Quoted 2 lines · William Lee Irwin III
Quoted 2 lines
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.
Quoted 2 lines · Christoph Hellwig
Why? I'd prefer to completly get rid of the
SLAB_flags instead. (stupid slowaris compat..)
Kill SLAB_KERNEL and SLAB_ATOMIC.
Documentation/DMA-mapping.txt | 4 +- Documentation/filesystems/devfs/ChangeLog | 1 Documentation/usb/URB.txt | 2 - arch/arm/common/sa1111-pcipool.c | 6 ++-- arch/i386/mm/pgtable.c | 4 +- arch/ia64/ia32/binfmt_elf32.c | 6 ++-- arch/ia64/kernel/perfmon.c | 2 - arch/ia64/mm/init.c | 4 +- arch/s390x/kernel/exec32.c | 2 - arch/x86_64/ia32/ia32_binfmt.c | 2 - drivers/block/DAC960.c | 4 +- drivers/block/ll_rw_blk.c | 2 - drivers/ieee1394/amdtp.c | 16 +++++----- drivers/ieee1394/cmp.c | 2 - drivers/ieee1394/eth1394.c | 2 - drivers/ieee1394/hosts.c | 2 - drivers/ieee1394/iso.c | 2 - drivers/ieee1394/nodemgr.c | 2 - drivers/ieee1394/ohci1394.c | 12 ++++---- drivers/ieee1394/pcilynx.c | 2 - drivers/ieee1394/raw1394.c | 44 +++++++++++++++--------------- drivers/ieee1394/sbp2.c | 2 - drivers/pci/pool.c | 8 ++--- drivers/usb/core/hub.c | 2 - drivers/usb/core/message.c | 2 - drivers/usb/host/ehci-dbg.c | 2 - drivers/usb/host/ehci-hcd.c | 2 - drivers/usb/host/ehci-q.c | 2 - drivers/usb/host/ohci-dbg.c | 2 - drivers/usb/host/ohci-q.c | 4 +- drivers/usb/host/uhci-hcd.c | 2 - drivers/usb/input/aiptek.c | 2 - drivers/usb/input/hid-core.c | 10 +++--- drivers/usb/input/powermate.c | 4 +- drivers/usb/input/usbkbd.c | 8 ++--- drivers/usb/input/usbmouse.c | 4 +- drivers/usb/input/wacom.c | 2 - drivers/usb/input/xpad.c | 2 - drivers/usb/misc/usbtest.c | 28 +++++++++---------- drivers/usb/net/catc.c | 2 - drivers/usb/net/kaweth.c | 2 - drivers/usb/net/pegasus.c | 2 - drivers/usb/net/rtl8150.c | 2 - fs/adfs/super.c | 2 - fs/affs/super.c | 2 - fs/afs/super.c | 2 - fs/befs/linuxvfs.c | 2 - fs/bfs/inode.c | 2 - fs/block_dev.c | 2 - fs/char_dev.c | 2 - fs/cifs/cifsfs.c | 2 - fs/cifs/misc.c | 2 - fs/cifs/transport.c | 2 - fs/coda/inode.c | 2 - fs/devfs/base.c | 4 +- fs/dnotify.c | 2 - fs/dquot.c | 2 - fs/efs/super.c | 2 - fs/eventpoll.c | 4 +- fs/exec.c | 2 - fs/ext2/super.c | 2 - fs/fat/inode.c | 2 - fs/fcntl.c | 2 - fs/file_table.c | 2 - fs/freevxfs/vxfs_fshead.c | 2 - fs/freevxfs/vxfs_inode.c | 4 +- fs/hfs/super.c | 2 - fs/hpfs/super.c | 2 - fs/inode.c | 2 - fs/intermezzo/dcache.c | 2 - fs/isofs/inode.c | 2 - fs/jffs/jffs_fm.c | 4 +- fs/jffs2/super.c | 2 - fs/locks.c | 2 - fs/minix/inode.c | 2 - fs/ncpfs/inode.c | 2 - fs/nfs/inode.c | 2 - fs/proc/inode.c | 2 - fs/qnx4/inode.c | 2 - fs/reiserfs/super.c | 2 - fs/romfs/inode.c | 2 - fs/smbfs/inode.c | 2 - fs/smbfs/request.c | 2 - fs/sysv/inode.c | 2 - fs/udf/super.c | 2 - fs/ufs/super.c | 2 - include/linux/fs.h | 2 - include/linux/slab.h | 2 - include/net/tcp.h | 2 - kernel/fork.c | 6 ++-- kernel/user.c | 2 - mm/mmap.c | 6 ++-- mm/mremap.c | 2 - mm/shmem.c | 2 - mm/slab.c | 2 - net/core/dst.c | 2 - net/core/neighbour.c | 2 - net/decnet/dn_table.c | 2 - net/ipv4/fib_hash.c | 2 - net/ipv4/tcp_ipv4.c | 2 - net/ipv4/tcp_minisocks.c | 2 - net/ipv4/xfrm_input.c | 2 - net/ipv4/xfrm_policy.c | 2 - net/ipv6/ip6_fib.c | 2 - net/socket.c | 2 - net/sunrpc/rpc_pipe.c | 2 - 106 files changed, 180 insertions(+), 181 deletions(-)
Documentation/DMA-mapping.txt +2 -2
@@ -341,8 +341,8 @@ Allocate memory from a pci pool like thi cpu_addr = pci_pool_alloc(pool, flags, &dma_handle); -flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor -holding SMP locks), SLAB_ATOMIC otherwise. Like pci_alloc_consistent, +flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor +holding SMP locks), GFP_ATOMIC otherwise. Like pci_alloc_consistent, this returns two values, cpu_addr and dma_handle. Free memory that was allocated from a pci_pool like this:
Documentation/filesystems/devfs/ChangeLog +1 -1
@@ -1822,7 +1822,7 @@ Changes for patch v202 =============================================================================== Changes for patch v203 -- Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> +- Use GFP_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> =============================================================================== Changes for patch v204
Documentation/usb/URB.txt +1 -1
@@ -121,7 +121,7 @@ Just call int usb_submit_urb(struct urb *urb, int mem_flags) -The mem_flags parameter, such as SLAB_ATOMIC, controls memory allocation, +The mem_flags parameter, such as GFP_ATOMIC, controls memory allocation, such as whether the lower levels may block when memory is tight. It immediately returns, either with status 0 (request queued) or some
arch/arm/common/sa1111-pcipool.c +3 -3
@@ -110,7 +110,7 @@ pci_pool_create (const char *name, struc }else if (allocation < size)return 0 ; -if (!(retval =kmalloc (sizeof *retval,SLAB_KERNEL ))) +if (!(retval =kmalloc (sizeof *retval,GFP_KERNEL )))return retval;strncpy (retval->name, name,sizeof retval->name);
@@ -228,7 +228,7 @@ pci_pool_destroy (struct pci_pool *pool)/** * pci_pool_alloc - get a block of consistent memory * @pool: pci pool that will produce the block -* @mem_flags: SLAB_KERNEL or SLAB_ATOMIC +* @mem_flags: GFP_KERNEL or GFP_ATOMIC * @handle: pointer to dma address of block * * This returns the kernel virtual address of a currently unused block,
@@ -266,7 +266,7 @@ restart: } }if (!(page =pool_alloc_page (pool, mem_flags))) { -if (mem_flags ==SLAB_KERNEL ) { +if (mem_flags ==GFP_KERNEL ) {DECLARE_WAITQUEUE (wait, current); current->state =TASK_INTERRUPTIBLE ;
arch/i386/mm/pgtable.c +2 -2
@@ -188,7 +188,7 @@ void pgd_ctor(void *__pgd, kmem_cache_tpgd_t *pgd_alloc (struct mm_struct *mm) {int i; -pgd_t *pgd =kmem_cache_alloc (pgd_cache,SLAB_KERNEL ); +pgd_t *pgd =kmem_cache_alloc (pgd_cache,GFP_KERNEL );if (PTRS_PER_PMD ==1 )return pgd;
@@ -196,7 +196,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)return NULL ;for (i =0 ; i <USER_PTRS_PER_PGD ; ++i) { -pmd_t *pmd =kmem_cache_alloc (pmd_cache,SLAB_KERNEL ); +pmd_t *pmd =kmem_cache_alloc (pmd_cache,GFP_KERNEL );if (!pmd) goto out_oom;set_pgd (pgd + i,__pgd (1 +__pa ((unsigned long long )((unsigned long )pmd))));
arch/ia64/ia32/binfmt_elf32.c +3 -3
@@ -79,7 +79,7 @@ ia64_elf32_init (struct pt_regs *regs)* it with privilege level 3 because the IVE uses non-privileged accesses to these * tables. IA-32 segmentation is used to protect against IA-32 accesses to them. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA32_GDT_OFFSET ;
@@ -101,7 +101,7 @@ ia64_elf32_init (struct pt_regs *regs)* Install LDT as anonymous memory. This gives us all-zero segment descriptors * until a task modifies them via modify_ldt(). */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA32_LDT_OFFSET ;
@@ -172,7 +172,7 @@ ia32_setup_arg_pages (struct linux_binpr bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
arch/ia64/kernel/perfmon.c +1 -1
@@ -796,7 +796,7 @@ pfm_smpl_buffer_alloc(pfm_context_t *ctx }/* allocate vma */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!vma) {DBprintk (("Cannot allocate vma\n" )); goto error_kmem;
arch/ia64/mm/init.c +2 -2
@@ -74,7 +74,7 @@ ia64_init_addr_space (void)* the problem. When the process attempts to write to the register backing store * for the first time, it will get a SEGFAULT in this case. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA64_RBS_BOT ;
@@ -90,7 +90,7 @@ ia64_init_addr_space (void)/* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ if (!(current->personality &MMAP_PAGE_ZERO )) { - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) {memset (vma,0 ,sizeof (*vma)); vma->vm_mm = current->mm;
arch/s390x/kernel/exec32.c +1 -1
@@ -51,7 +51,7 @@ int setup_arg_pages32(struct linux_binpr bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
arch/x86_64/ia32/ia32_binfmt.c +1 -1
@@ -290,7 +290,7 @@ int setup_arg_pages(struct linux_binprm bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
drivers/block/DAC960.c +2 -2
@@ -251,13 +251,13 @@ static boolean DAC960_CreateAuxiliaryStr Command->Next = Controller->FreeCommands; Controller->FreeCommands = Command; Controller->Commands[CommandIdentifier-1 ] = Command; - ScatterGatherCPU =pci_pool_alloc (ScatterGatherPool,SLAB_ATOMIC , + ScatterGatherCPU =pci_pool_alloc (ScatterGatherPool,GFP_ATOMIC , &ScatterGatherDMA);if (ScatterGatherCPU ==NULL )return DAC960_Failure (Controller,"AUXILIARY STRUCTURE CREATION" );if (RequestSensePool !=NULL ) { - RequestSenseCPU =pci_pool_alloc (RequestSensePool,SLAB_ATOMIC , + RequestSenseCPU =pci_pool_alloc (RequestSensePool,GFP_ATOMIC , &RequestSenseDMA);if (RequestSenseCPU ==NULL ) { pci_pool_free(ScatterGatherPool, ScatterGatherCPU,
drivers/block/ll_rw_blk.c +1 -1
@@ -1222,7 +1222,7 @@ static int blk_init_free_list(request_qu*/ rl = &q->rq[READ ];for (i =0 ; i < (queue_nr_requests*2 ); i++) { - rq =kmem_cache_alloc (request_cachep,SLAB_KERNEL ); + rq =kmem_cache_alloc (request_cachep,GFP_KERNEL );if (!rq) goto nomem;
drivers/ieee1394/amdtp.c +8 -8
@@ -558,15 +558,15 @@ struct packet_list *packet_list_alloc(ststruct packet_list *pl;struct packet *next; - pl =kmalloc (sizeof *pl,SLAB_KERNEL ); + pl =kmalloc (sizeof *pl,GFP_KERNEL );if (pl ==NULL )return NULL ;for (i =0 ; i <PACKET_LIST_SIZE ; i++) {struct packet *p = &pl->packets[i]; - p->db =pci_pool_alloc (s->descriptor_pool,SLAB_KERNEL , + p->db =pci_pool_alloc (s->descriptor_pool,GFP_KERNEL , &p->db_bus); - p->payload =pci_pool_alloc (s->packet_pool,SLAB_KERNEL , + p->payload =pci_pool_alloc (s->packet_pool,GFP_KERNEL , &p->payload_bus); }
@@ -597,7 +597,7 @@ static struct buffer *buffer_alloc(int s {struct buffer *b; - b =kmalloc (sizeof *b + size,SLAB_KERNEL ); + b =kmalloc (sizeof *b + size,GFP_KERNEL ); b->head =0 ; b->tail =0 ; b->length =0 ;
@@ -834,7 +834,7 @@ static int stream_alloc_packet_lists(str max_packet_size = max_nevents * s->dimension *4 +8 ; s->packet_pool =hpsb_pci_pool_create ("packet pool" , s->host->ohci->dev, - max_packet_size,0 ,0 ,SLAB_KERNEL ); + max_packet_size,0 ,0 ,GFP_KERNEL );if (s->packet_pool ==NULL )return -1 ;
@@ -1006,7 +1006,7 @@ struct stream *stream_alloc(struct amdtpstruct stream *s;unsigned long flags; - s =kmalloc (sizeof (struct stream ),SLAB_KERNEL ); + s =kmalloc (sizeof (struct stream ),GFP_KERNEL );if (s ==NULL )return NULL ;
@@ -1021,7 +1021,7 @@ struct stream *stream_alloc(struct amdtp s->descriptor_pool =hpsb_pci_pool_create ("descriptor pool" , host->ohci->dev,sizeof (struct descriptor_block ), -16 ,0 ,SLAB_KERNEL ); +16 ,0 ,GFP_KERNEL );if (s->descriptor_pool ==NULL ) {kfree (s->input);
@@ -1212,7 +1212,7 @@ static void amdtp_add_host(struct hpsb_hif (strcmp (host->driver->name,OHCI1394_DRIVER_NAME ) !=0 )return ; - ah =kmalloc (sizeof *ah,in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + ah =kmalloc (sizeof *ah,in_interrupt () ?GFP_ATOMIC :GFP_KERNEL ); ah->host = host; ah->ohci = host->hostdata;INIT_LIST_HEAD (&ah->stream_list);
drivers/ieee1394/cmp.c +1 -1
@@ -159,7 +159,7 @@ static void cmp_add_host(struct hpsb_hos {struct cmp_host *ch; - ch =kmalloc (sizeof *ch,in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + ch =kmalloc (sizeof *ch,in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (ch ==NULL ) {HPSB_ERR ("Failed to allocate cmp_host" );return ;
drivers/ieee1394/eth1394.c +1 -1
@@ -360,7 +360,7 @@ static void ether1394_add_host (struct h priv->host = host; hi = (struct host_info *)kmalloc (sizeof (struct host_info ), -in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); +in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (hi ==NULL ) goto out;
drivers/ieee1394/hosts.c +1 -1
@@ -123,7 +123,7 @@ struct hpsb_host *hpsb_alloc_host(structstruct hpsb_host *h;int i; - h =kmalloc (sizeof (struct hpsb_host ) + extra,SLAB_KERNEL ); + h =kmalloc (sizeof (struct hpsb_host ) + extra,GFP_KERNEL );if (!h)return NULL ;memset (h,0 ,sizeof (struct hpsb_host ) + extra);
drivers/ieee1394/iso.c +1 -1
@@ -80,7 +80,7 @@ static struct hpsb_iso* hpsb_iso_common_/* allocate and write the struct hpsb_iso */ - iso =kmalloc (sizeof (*iso),SLAB_KERNEL ); + iso =kmalloc (sizeof (*iso),GFP_KERNEL );if (!iso)return NULL ;
drivers/ieee1394/nodemgr.c +1 -1
@@ -1325,7 +1325,7 @@ static void nodemgr_add_host(struct hpsbstruct host_info *hi;unsigned long flags; - hi =kmalloc (sizeof (struct host_info ),in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + hi =kmalloc (sizeof (struct host_info ),in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (!hi) {HPSB_ERR ("NodeMgr: out of memory in add host" );
drivers/ieee1394/ohci1394.c +6 -6
@@ -1056,7 +1056,7 @@ static int ohci_iso_recv_init(struct hpsint ctx;int ret = -ENOMEM ; - recv =kmalloc (sizeof (*recv),SLAB_KERNEL ); + recv =kmalloc (sizeof (*recv),GFP_KERNEL );if (!recv)return -ENOMEM ;
@@ -1416,7 +1416,7 @@ static int ohci_iso_xmit_init(struct hpsint ctx;int ret = -ENOMEM ; - xmit =kmalloc (sizeof (*xmit),SLAB_KERNEL ); + xmit =kmalloc (sizeof (*xmit),GFP_KERNEL );if (!xmit)return -ENOMEM ;
@@ -2394,7 +2394,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, } d->prg_pool =hpsb_pci_pool_create ("ohci1394 rcv prg" , ohci->dev, -sizeof (struct dma_cmd ),4 ,0 ,SLAB_KERNEL ); +sizeof (struct dma_cmd ),4 ,0 ,GFP_KERNEL );OHCI_DMA_ALLOC ("dma_rcv prg pool" );for (i=0 ; i<d->num_desc; i++) {
@@ -2412,7 +2412,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci,return -ENOMEM ; } - d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,SLAB_KERNEL , d->prg_bus+i); + d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,GFP_KERNEL , d->prg_bus+i);OHCI_DMA_ALLOC ("pool dma_rcv prg[%d]" , i);if (d->prg_cpu[i] !=NULL ) {
@@ -2503,11 +2503,11 @@ alloc_dma_trm_ctx(struct ti_ohci *ohci,memset (d->prg_bus,0 , d->num_desc *sizeof (dma_addr_t)); d->prg_pool =hpsb_pci_pool_create ("ohci1394 trm prg" , ohci->dev, -sizeof (struct at_dma_prg ),4 ,0 ,SLAB_KERNEL ); +sizeof (struct at_dma_prg ),4 ,0 ,GFP_KERNEL );OHCI_DMA_ALLOC ("dma_rcv prg pool" );for (i =0 ; i < d->num_desc; i++) { - d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,SLAB_KERNEL , d->prg_bus+i); + d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,GFP_KERNEL , d->prg_bus+i);OHCI_DMA_ALLOC ("pool dma_trm prg[%d]" , i);if (d->prg_cpu[i] !=NULL ) {
drivers/ieee1394/pcilynx.c +1 -1
@@ -865,7 +865,7 @@ static int mem_open(struct inode *inode, type = t_ram; } - md = (struct memdata *)kmalloc (sizeof (struct memdata ),SLAB_KERNEL ); + md = (struct memdata *)kmalloc (sizeof (struct memdata ),GFP_KERNEL );if (md ==NULL )return -ENOMEM ;
drivers/ieee1394/raw1394.c +22 -22
171 lines not on this page · raw message
drivers/ieee1394/sbp2.c +1 -1
@@ -1011,7 +1011,7 @@ static void sbp2_add_host(struct hpsb_ho/* Allocate some memory for our host info structure */ hi = (struct sbp2scsi_host_info *)kmalloc (sizeof (struct sbp2scsi_host_info ), -in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); +in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (hi ==NULL ) {SBP2_ERR ("out of memory in sbp2_add_host" );
drivers/pci/pool.c +4 -4
@@ -125,7 +125,7 @@ pci_pool_create (const char *name, struc }else if (allocation < size)return 0 ; -if (!(retval =kmalloc (sizeof *retval,SLAB_KERNEL ))) +if (!(retval =kmalloc (sizeof *retval,GFP_KERNEL )))return retval;strncpy (retval->name, name,sizeof retval->name);
@@ -249,7 +249,7 @@ pci_pool_destroy (struct pci_pool *pool)/** * pci_pool_alloc - get a block of consistent memory * @pool: pci pool that will produce the block -* @mem_flags: SLAB_KERNEL or SLAB_ATOMIC +* @mem_flags: GFP_KERNEL or GFP_ATOMIC * @handle: pointer to dma address of block * * This returns the kernel virtual address of a currently unused block,
@@ -286,8 +286,8 @@ restart: } } } -if (!(page =pool_alloc_page (pool,SLAB_ATOMIC ))) { -if (mem_flags ==SLAB_KERNEL ) { +if (!(page =pool_alloc_page (pool,GFP_ATOMIC ))) { +if (mem_flags ==GFP_KERNEL ) {DECLARE_WAITQUEUE (wait, current); current->state =TASK_INTERRUPTIBLE ;
drivers/usb/core/hub.c +1 -1
@@ -233,7 +233,7 @@ void usb_hub_tt_clear_buffer (struct usb* since each TT has "at least two" buffers that can need it (and * there can be many TTs per hub). even if they're uncommon. */ -if ((clear =kmalloc (sizeof *clear,SLAB_ATOMIC )) ==0 ) { +if ((clear =kmalloc (sizeof *clear,GFP_ATOMIC )) ==0 ) {err ("can't save CLEAR_TT_BUFFER state for hub at usb-%s-%s" , dev->bus->bus_name, tt->hub->devpath);/* FIXME recover somehow ... RESET_TT? */
drivers/usb/core/message.c +1 -1
@@ -439,7 +439,7 @@ void usb_sg_wait (struct usb_sg_requestfor (i =0 ; i < io->entries && !io->status; i++) {int retval; - retval =usb_submit_urb (io->urbs [i],SLAB_ATOMIC ); + retval =usb_submit_urb (io->urbs [i],GFP_ATOMIC );/* after we submit, let completions or cancelations fire; * we handshake using io->status.
drivers/usb/host/ehci-dbg.c +1 -1
@@ -429,7 +429,7 @@ show_periodic (struct device *dev, charchar *next;unsigned i, tag; -if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,SLAB_ATOMIC ))) +if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,GFP_ATOMIC )))return 0 ; seen_count =0 ;
drivers/usb/host/ehci-hcd.c +1 -1
@@ -361,7 +361,7 @@ static int ehci_start (struct usb_hcd *h* periodic_size can shrink by USBCMD update if hcc_params allows. */ ehci->periodic_size =DEFAULT_I_TDPS ; -if ((retval =ehci_mem_init (ehci,SLAB_KERNEL )) <0 ) +if ((retval =ehci_mem_init (ehci,GFP_KERNEL )) <0 )return retval;/* controllers may cache some of the periodic schedule ... */
drivers/usb/host/ehci-q.c +1 -1
@@ -756,7 +756,7 @@ static struct ehci_qh *qh_append_tds ( qh = (struct ehci_qh *) *ptr;if (unlikely (qh ==0 )) {/* can't sleep here, we have ehci->lock... */ - qh =qh_make (ehci, urb,SLAB_ATOMIC ); + qh =qh_make (ehci, urb,GFP_ATOMIC ); *ptr = qh; }if (likely (qh !=0 )) {
drivers/usb/host/ohci-dbg.c +1 -1
@@ -427,7 +427,7 @@ show_periodic (struct device *dev, charchar *next;unsigned i; -if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,SLAB_ATOMIC ))) +if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,GFP_ATOMIC )))return 0 ; seen_count =0 ;
drivers/usb/host/ohci-q.c +2 -2
@@ -362,7 +362,7 @@ static struct ed *ed_get (if (!(ed = dev->ep [ep])) {struct td *td; - ed =ed_alloc (ohci,SLAB_ATOMIC ); + ed =ed_alloc (ohci,GFP_ATOMIC );if (!ed) {/* out of memory */ goto done;
@@ -370,7 +370,7 @@ static struct ed *ed_get ( dev->ep [ep] = ed;/* dummy td; end of td list for ed */ - td =td_alloc (ohci,SLAB_ATOMIC ); + td =td_alloc (ohci,GFP_ATOMIC );if (!td) {/* out of memory */ ed_free (ohci, ed);
drivers/usb/host/uhci-hcd.c +1 -1
@@ -647,7 +647,7 @@ static struct urb_priv *uhci_alloc_urb_p {struct urb_priv *urbp; - urbp =kmem_cache_alloc (uhci_up_cachep,SLAB_ATOMIC ); + urbp =kmem_cache_alloc (uhci_up_cachep,GFP_ATOMIC );if (!urbp) {err ("uhci_alloc_urb_priv: couldn't allocate memory for urb_priv\n" );return NULL ;
drivers/usb/input/aiptek.c +1 -1
@@ -263,7 +263,7 @@ aiptek_probe(struct usb_interface *intf,memset (aiptek,0 ,sizeof (struct aiptek )); - aiptek->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &aiptek->data_dma); + aiptek->data =usb_buffer_alloc (dev,10 ,GFP_ATOMIC , &aiptek->data_dma);if (!aiptek->data) {kfree (aiptek);return -ENOMEM ;
drivers/usb/input/hid-core.c +5 -5
@@ -915,7 +915,7 @@ static void hid_irq_in(struct urb *urb,dbg ("nonzero status in input irq %d" , urb->status); } - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input%d, status %d", hid->dev->bus->bus_name, hid->dev->devpath,
@@ -1377,13 +1377,13 @@ struct hid_blacklist {static int hid_alloc_buffers (struct usb_device *dev,struct hid_device *hid) { -if (!(hid->inbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->inbuf_dma))) +if (!(hid->inbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->inbuf_dma)))return -1 ; -if (!(hid->outbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->outbuf_dma))) +if (!(hid->outbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->outbuf_dma)))return -1 ; -if (!(hid->cr =usb_buffer_alloc (dev,sizeof (*(hid->cr)),SLAB_ATOMIC , &hid->cr_dma))) +if (!(hid->cr =usb_buffer_alloc (dev,sizeof (*(hid->cr)),GFP_ATOMIC , &hid->cr_dma)))return -1 ; -if (!(hid->ctrlbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->ctrlbuf_dma))) +if (!(hid->ctrlbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->ctrlbuf_dma)))return -1 ;return 0 ;
drivers/usb/input/powermate.c +2 -2
@@ -270,11 +270,11 @@ static int powermate_input_event(structstatic int powermate_alloc_buffers (struct usb_device *udev,struct powermate_device *pm) { pm->data =usb_buffer_alloc (udev,POWERMATE_PAYLOAD_SIZE , -SLAB_ATOMIC , &pm->data_dma); +GFP_ATOMIC , &pm->data_dma);if (!pm->data)return -1 ; pm->configcr =usb_buffer_alloc (udev,sizeof (*(pm->configcr)), -SLAB_ATOMIC , &pm->configcr_dma); +GFP_ATOMIC , &pm->configcr_dma);if (!pm->configcr)return -1 ;
drivers/usb/input/usbkbd.c +4 -4
@@ -126,7 +126,7 @@ static void usb_kbd_irq(struct urb *urb,memcpy (kbd->old, kbd->new,8 ); resubmit: - i =usb_submit_urb (urb,SLAB_ATOMIC ); + i =usb_submit_urb (urb,GFP_ATOMIC );if (i) err ("can't resubmit intr, %s-%s/input0, status %d", kbd->usbdev->bus->bus_name,
@@ -204,11 +204,11 @@ static int usb_kbd_alloc_mem(struct usb_return -1 ;if (!(kbd->led =usb_alloc_urb (0 ,GFP_KERNEL )))return -1 ; -if (!(kbd->new =usb_buffer_alloc (dev,8 ,SLAB_ATOMIC , &kbd->new_dma))) +if (!(kbd->new =usb_buffer_alloc (dev,8 ,GFP_ATOMIC , &kbd->new_dma)))return -1 ; -if (!(kbd->cr =usb_buffer_alloc (dev,sizeof (struct usb_ctrlrequest ),SLAB_ATOMIC , &kbd->cr_dma))) +if (!(kbd->cr =usb_buffer_alloc (dev,sizeof (struct usb_ctrlrequest ),GFP_ATOMIC , &kbd->cr_dma)))return -1 ; -if (!(kbd->leds =usb_buffer_alloc (dev,1 ,SLAB_ATOMIC , &kbd->leds_dma))) +if (!(kbd->leds =usb_buffer_alloc (dev,1 ,GFP_ATOMIC , &kbd->leds_dma)))return -1 ;return 0 ;
drivers/usb/input/usbmouse.c +2 -2
@@ -90,7 +90,7 @@ static void usb_mouse_irq(struct urb *urinput_sync (dev); resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input0, status %d", mouse->usbdev->bus->bus_name,
@@ -149,7 +149,7 @@ static int usb_mouse_probe(struct usb_inreturn -ENOMEM ;memset (mouse,0 ,sizeof (struct usb_mouse )); - mouse->data =usb_buffer_alloc (dev,8 ,SLAB_ATOMIC , &mouse->data_dma); + mouse->data =usb_buffer_alloc (dev,8 ,GFP_ATOMIC , &mouse->data_dma);if (!mouse->data) {kfree (mouse);return -ENOMEM ;
drivers/usb/input/wacom.c +1 -1
@@ -507,7 +507,7 @@ static int wacom_probe(struct usb_interfreturn -ENOMEM ;memset (wacom,0 ,sizeof (struct wacom )); - wacom->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &wacom->data_dma); + wacom->data =usb_buffer_alloc (dev,10 ,GFP_ATOMIC , &wacom->data_dma);if (!wacom->data) {kfree (wacom);return -ENOMEM ;
drivers/usb/input/xpad.c +1 -1
@@ -239,7 +239,7 @@ static int xpad_probe(struct usb_interfamemset (xpad,0 ,sizeof (struct usb_xpad )); xpad->idata =usb_buffer_alloc (udev,XPAD_PKT_LEN , -SLAB_ATOMIC , &xpad->idata_dma); +GFP_ATOMIC , &xpad->idata_dma);if (!xpad->idata) {kfree (xpad);return -ENOMEM ;
drivers/usb/misc/usbtest.c +14 -14
@@ -100,7 +100,7 @@ static struct urb *simple_alloc_urb (if (bytes <0 )return 0 ; - urb =usb_alloc_urb (0 ,SLAB_KERNEL ); + urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!urb)return urb;usb_fill_bulk_urb (urb, udev, pipe,0 , bytes, simple_callback,0 );
@@ -110,7 +110,7 @@ static struct urb *simple_alloc_urb ( urb->transfer_flags =URB_NO_DMA_MAP ;if (usb_pipein (pipe)) urb->transfer_flags |=URB_SHORT_NOT_OK ; - urb->transfer_buffer =usb_buffer_alloc (udev, bytes,SLAB_KERNEL , + urb->transfer_buffer =usb_buffer_alloc (udev, bytes,GFP_KERNEL , &urb->transfer_dma);if (!urb->transfer_buffer) {usb_free_urb (urb);
@@ -141,7 +141,7 @@ static int simple_io ( urb->context = &completion;while (retval ==0 && iterations-- >0 ) {init_completion (&completion); -if ((retval =usb_submit_urb (urb,SLAB_KERNEL )) !=0 ) +if ((retval =usb_submit_urb (urb,GFP_KERNEL )) !=0 )break ;/* NOTE: no timeouts; can't be broken out of by interrupt */
@@ -198,7 +198,7 @@ alloc_sglist (int nents, int max, int vaunsigned i;unsigned size = max; - sg =kmalloc (nents *sizeof *sg,SLAB_KERNEL ); + sg =kmalloc (nents *sizeof *sg,GFP_KERNEL );if (!sg)return 0 ;memset (sg,0 , nents *sizeof *sg);
@@ -206,7 +206,7 @@ alloc_sglist (int nents, int max, int vafor (i =0 ; i < nents; i++) {char *buf; - buf =kmalloc (size,SLAB_KERNEL ); + buf =kmalloc (size,GFP_KERNEL );if (!buf) {free_sglist (sg, i);return 0 ;
@@ -245,7 +245,7 @@ static int perform_sglist ( (udev->speed ==USB_SPEED_HIGH ) ? (INTERRUPT_RATE <<3 ) :INTERRUPT_RATE , - sg, nents, 0, SLAB_KERNEL); + sg, nents, 0, GFP_KERNEL);if (retval)break ;
@@ -658,7 +658,7 @@ error:/* resubmit if we need to, else mark this as done */ if ((status ==0 ) && (ctx->pending < ctx->count)) { -if ((status =usb_submit_urb (urb,SLAB_ATOMIC )) !=0 ) { +if ((status =usb_submit_urb (urb,GFP_ATOMIC )) !=0 ) {dbg ("can't resubmit ctrl %02x.%02x, err %d" , reqp->bRequestType, reqp->bRequest, status); urb->dev =0 ;
@@ -693,7 +693,7 @@ test_ctrl_queue (struct usbtest_dev *dev* as with bulk/intr sglists, sglen is the queue depth; it also * controls which subtests run (more tests than sglen) or rerun. */ - urb =kmalloc (param->sglen *sizeof (struct urb *),SLAB_KERNEL ); + urb =kmalloc (param->sglen *sizeof (struct urb *),GFP_KERNEL );if (!urb) goto cleanup;memset (urb,0 , param->sglen *sizeof (struct urb *));
@@ -793,7 +793,7 @@ test_ctrl_queue (struct usbtest_dev *devif (!u) goto cleanup; - reqp =usb_buffer_alloc (udev,sizeof req,SLAB_KERNEL , + reqp =usb_buffer_alloc (udev,sizeof req,GFP_KERNEL , &u->setup_dma);if (!reqp) goto cleanup;
@@ -809,7 +809,7 @@ test_ctrl_queue (struct usbtest_dev *dev context.urb = urb;spin_lock_irq (&context.lock);for (i =0 ; i < param->sglen; i++) { - context.status =usb_submit_urb (urb [i],SLAB_ATOMIC ); + context.status =usb_submit_urb (urb [i],GFP_ATOMIC );if (context.status !=0 ) {dbg ("can't submit urb[%d], status %d" , i, context.status);
@@ -849,7 +849,7 @@ static void unlink1_callback (struct urb// we "know" -EPIPE (stall) never happens if (!status) - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) {if (status == -ECONNRESET || status == -ENOENT ) status =0 ;
@@ -877,7 +877,7 @@ static int unlink1 (struct usbtest_dev ** FIXME want additional tests for when endpoint is STALLing * due to errors, or is just NAKing requests. */ -if ((retval =usb_submit_urb (urb,SLAB_KERNEL )) !=0 ) { +if ((retval =usb_submit_urb (urb,GFP_KERNEL )) !=0 ) {dbg ("submit/unlink fail %d" , retval);return retval; }
@@ -1214,7 +1214,7 @@ usbtest_probe (struct usb_interface *int }#endif - dev =kmalloc (sizeof *dev,SLAB_KERNEL ); + dev =kmalloc (sizeof *dev,GFP_KERNEL );if (!dev)return -ENOMEM ;memset (dev,0 ,sizeof *dev);
@@ -1229,7 +1229,7 @@ usbtest_probe (struct usb_interface *int dev->intf = intf;/* cacheline-aligned scratch for i/o */ -if ((dev->buf =kmalloc (TBUF_SIZE ,SLAB_KERNEL )) ==0 ) { +if ((dev->buf =kmalloc (TBUF_SIZE ,GFP_KERNEL )) ==0 ) {kfree (dev);return -ENOMEM ; }
drivers/usb/net/catc.c +1 -1
@@ -343,7 +343,7 @@ static void catc_irq_done(struct urb *ur } } resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s, status %d", catc->usbdev->bus->bus_name,
drivers/usb/net/kaweth.c +1 -1
@@ -499,7 +499,7 @@ static void int_callback(struct urb *u, kaweth->linkstate = act_state; } resubmit: - status =usb_submit_urb (u,SLAB_ATOMIC ); + status =usb_submit_urb (u,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s, status %d", kaweth->dev->bus->bus_name,
drivers/usb/net/pegasus.c +1 -1
@@ -719,7 +719,7 @@ static void intr_callback(struct urb *ur } } - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status)err ("%s: can't resubmit interrupt urb, %d" , net->name, status); }
drivers/usb/net/rtl8150.c +1 -1
@@ -475,7 +475,7 @@ void intr_callback(struct urb *urb, stru/* FIXME if this doesn't do anything, don't submit the urb! */ resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input0, status %d", dev->udev->bus->bus_name,
fs/adfs/super.c +1 -1
@@ -210,7 +210,7 @@ static kmem_cache_t *adfs_inode_cachep;static struct inode *adfs_alloc_inode (struct super_block *sb) {struct adfs_inode_info *ei; - ei = (struct adfs_inode_info *)kmem_cache_alloc (adfs_inode_cachep,SLAB_KERNEL ); + ei = (struct adfs_inode_info *)kmem_cache_alloc (adfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/affs/super.c +1 -1
@@ -89,7 +89,7 @@ static kmem_cache_t * affs_inode_cachep;static struct inode *affs_alloc_inode (struct super_block *sb) {struct affs_inode_info *ei; - ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,SLAB_KERNEL ); + ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
fs/afs/super.c +1 -1
@@ -484,7 +484,7 @@ static struct inode *afs_alloc_inode(str {afs_vnode_t *vnode; - vnode = (afs_vnode_t *)kmem_cache_alloc (afs_inode_cachep,SLAB_KERNEL ); + vnode = (afs_vnode_t *)kmem_cache_alloc (afs_inode_cachep,GFP_KERNEL );if (!vnode)return NULL ;
fs/befs/linuxvfs.c +1 -1
@@ -282,7 +282,7 @@ befs_alloc_inode(struct super_block *sb) {struct befs_inode_info *bi; bi = (struct befs_inode_info *)kmem_cache_alloc (befs_inode_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (!bi)return NULL ;return &bi->vfs_inode;
fs/bfs/inode.c +1 -1
@@ -219,7 +219,7 @@ static kmem_cache_t * bfs_inode_cachep;static struct inode *bfs_alloc_inode (struct super_block *sb) {struct bfs_inode_info *bi; - bi =kmem_cache_alloc (bfs_inode_cachep,SLAB_KERNEL ); + bi =kmem_cache_alloc (bfs_inode_cachep,GFP_KERNEL );if (!bi)return NULL ;return &bi->vfs_inode;
fs/block_dev.c +1 -1
@@ -223,7 +223,7 @@ static spinlock_t bdev_lock __cacheline_static kmem_cache_t * bdev_cachep;#define alloc_bdev () \ - ((struct block_device *) kmem_cache_alloc(bdev_cachep, SLAB_KERNEL)) + ((struct block_device *) kmem_cache_alloc(bdev_cachep, GFP_KERNEL))#define destroy_bdev (bdev) kmem_cache_free(bdev_cachep, (bdev))static void init_once (void * foo,kmem_cache_t * cachep,unsigned long flags)
fs/char_dev.c +1 -1
@@ -35,7 +35,7 @@ static spinlock_t cdev_lock = SPIN_LOCK_static kmem_cache_t * cdev_cachep;#define alloc_cdev () \ - ((struct char_device *) kmem_cache_alloc(cdev_cachep, SLAB_KERNEL)) + ((struct char_device *) kmem_cache_alloc(cdev_cachep, GFP_KERNEL))#define destroy_cdev (cdev) kmem_cache_free(cdev_cachep, (cdev))static void init_once (void *foo,kmem_cache_t *cachep,unsigned long flags)
fs/cifs/cifsfs.c +1 -1
@@ -174,7 +174,7 @@ cifs_alloc_inode(struct super_block *sb)struct cifsInodeInfo *cifs_inode; cifs_inode = (struct cifsInodeInfo *)kmem_cache_alloc (cifs_inode_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (!cifs_inode)return NULL ; cifs_inode->cifsAttrs =0x20 ;/* default */
fs/cifs/misc.c +1 -1
@@ -153,7 +153,7 @@ buf_get(void)but it may be more efficient to always alloc same size albeit slightly larger */ ret_buf = - (struct smb_hdr *)kmem_cache_alloc (cifs_req_cachep,SLAB_KERNEL ); + (struct smb_hdr *)kmem_cache_alloc (cifs_req_cachep,GFP_KERNEL );/* clear the first few header bytes */ if (ret_buf) {
fs/cifs/transport.c +1 -1
@@ -45,7 +45,7 @@ AllocMidQEntry(struct smb_hdr *smb_buffe } temp =kmalloc (sizeof (struct mid_q_entry ),GFP_KERNEL ); temp = (struct mid_q_entry *)kmem_cache_alloc (cifs_mid_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (temp ==NULL )return temp;else {
fs/coda/inode.c +1 -1
@@ -41,7 +41,7 @@ static kmem_cache_t * coda_inode_cachep;static struct inode *coda_alloc_inode (struct super_block *sb) {struct coda_inode_info *ei; - ei = (struct coda_inode_info *)kmem_cache_alloc (coda_inode_cachep,SLAB_KERNEL ); + ei = (struct coda_inode_info *)kmem_cache_alloc (coda_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;memset (&ei->c_fid,0 ,sizeof (struct ViceFid ));
fs/devfs/base.c +2 -2
@@ -577,7 +577,7 @@ Added process group check for devfsd privileges. v1.4 20011204 Richard Gooch <[email protected]> - Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. + Use GFP_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. v1.5 20011211 Richard Gooch <[email protected]> Return old entry in <devfs_mk_dir> for 2.4.x kernels.
@@ -1407,7 +1407,7 @@ static int devfsd_notify_de (struct devfif ( !( fs_info->devfsd_event_mask & (1 << type) ) )return (FALSE);if ( ( entry =kmem_cache_alloc (devfsd_buf_cache, - atomic ?SLAB_ATOMIC :SLAB_KERNEL ) ) + atomic ?GFP_ATOMIC :GFP_KERNEL ) ) ==NULL ) {atomic_inc (&fs_info->devfsd_overrun_count);
fs/dnotify.c +1 -1
@@ -79,7 +79,7 @@ int fcntl_dirnotify(int fd, struct file inode = filp->f_dentry->d_inode;if (!S_ISDIR (inode->i_mode))return -ENOTDIR ; - dn =kmem_cache_alloc (dn_cache,SLAB_KERNEL ); + dn =kmem_cache_alloc (dn_cache,GFP_KERNEL );if (dn ==NULL )return -ENOMEM ;write_lock (&dn_lock);
fs/dquot.c +1 -1
@@ -474,7 +474,7 @@ static struct dquot *get_empty_dquot(str {struct dquot *dquot; - dquot =kmem_cache_alloc (dquot_cachep,SLAB_KERNEL ); + dquot =kmem_cache_alloc (dquot_cachep,GFP_KERNEL );if (!dquot)return NODQUOT ;
fs/efs/super.c +1 -1
@@ -34,7 +34,7 @@ static kmem_cache_t * efs_inode_cachep;static struct inode *efs_alloc_inode (struct super_block *sb) {struct efs_inode_info *ei; - ei = (struct efs_inode_info *)kmem_cache_alloc (efs_inode_cachep,SLAB_KERNEL ); + ei = (struct efs_inode_info *)kmem_cache_alloc (efs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/eventpoll.c +2 -2
@@ -81,13 +81,13 @@ ((1 << (hbits)) % EP_HENTRY_X_PAGE ? 1: 0)))/* Macro to allocate a "struct epitem" from the slab cache */ -#define EPI_MEM_ALLOC () (struct epitem *) kmem_cache_alloc(epi_cache, SLAB_KERNEL) +#define EPI_MEM_ALLOC () (struct epitem *) kmem_cache_alloc(epi_cache, GFP_KERNEL)/* Macro to free a "struct epitem" to the slab cache */ #define EPI_MEM_FREE (p) kmem_cache_free(epi_cache, p)/* Macro to allocate a "struct eppoll_entry" from the slab cache */ -#define PWQ_MEM_ALLOC () (struct eppoll_entry *) kmem_cache_alloc(pwq_cache, SLAB_KERNEL) +#define PWQ_MEM_ALLOC () (struct eppoll_entry *) kmem_cache_alloc(pwq_cache, GFP_KERNEL)/* Macro to free a "struct eppoll_entry" to the slab cache */ #define PWQ_MEM_FREE (p) kmem_cache_free(pwq_cache, p)
fs/exec.c +1 -1
@@ -388,7 +388,7 @@ int setup_arg_pages(struct linux_binprm bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
fs/ext2/super.c +1 -1
@@ -154,7 +154,7 @@ static kmem_cache_t * ext2_inode_cachep;static struct inode *ext2_alloc_inode (struct super_block *sb) {struct ext2_inode_info *ei; - ei = (struct ext2_inode_info *)kmem_cache_alloc (ext2_inode_cachep,SLAB_KERNEL ); + ei = (struct ext2_inode_info *)kmem_cache_alloc (ext2_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;#ifdef CONFIG_EXT2_FS_POSIX_ACL
fs/fat/inode.c +1 -1
@@ -672,7 +672,7 @@ static kmem_cache_t *fat_inode_cachep;static struct inode *fat_alloc_inode (struct super_block *sb) {struct msdos_inode_info *ei; - ei = (struct msdos_inode_info *)kmem_cache_alloc (fat_inode_cachep,SLAB_KERNEL ); + ei = (struct msdos_inode_info *)kmem_cache_alloc (fat_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/fcntl.c +1 -1
@@ -550,7 +550,7 @@ int fasync_helper(int fd, struct file *int result =0 ;if (on) { - new =kmem_cache_alloc (fasync_cache,SLAB_KERNEL ); + new =kmem_cache_alloc (fasync_cache,GFP_KERNEL );if (!new)return -ENOMEM ; }
fs/file_table.c +1 -1
@@ -74,7 +74,7 @@ struct file * get_empty_filp(void)*/ if (files_stat.nr_files < files_stat.max_files) {file_list_unlock (); - f =kmem_cache_alloc (filp_cachep,SLAB_KERNEL ); + f =kmem_cache_alloc (filp_cachep,GFP_KERNEL );file_list_lock ();if (f) { files_stat.nr_files++;
fs/freevxfs/vxfs_fshead.c +1 -1
@@ -83,7 +83,7 @@ vxfs_getfsh(struct inode *ip, int which)if (buffer_mapped (bp)) {struct vxfs_fsh *fhp; -if (!(fhp =kmalloc (sizeof (*fhp),SLAB_KERNEL ))) +if (!(fhp =kmalloc (sizeof (*fhp),GFP_KERNEL )))return NULL ;memcpy (fhp, bp->b_data,sizeof (*fhp));
fs/freevxfs/vxfs_inode.c +2 -2
@@ -114,7 +114,7 @@ vxfs_blkiget(struct super_block *sbp, u_struct vxfs_inode_info *vip;struct vxfs_dinode *dip; -if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,SLAB_KERNEL ))) +if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,GFP_KERNEL ))) goto fail; dip = (struct vxfs_dinode *)(bp->b_data + offset);memcpy (vip, dip,sizeof (*vip));
@@ -156,7 +156,7 @@ __vxfs_iget(ino_t ino, struct inode *ilistruct vxfs_dinode *dip;caddr_t kaddr = (char *)page_address (pp); -if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,SLAB_KERNEL ))) +if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,GFP_KERNEL ))) goto fail; dip = (struct vxfs_dinode *)(kaddr + offset);memcpy (vip, dip,sizeof (*vip));
fs/hfs/super.c +1 -1
@@ -48,7 +48,7 @@ static kmem_cache_t * hfs_inode_cachep;static struct inode *hfs_alloc_inode (struct super_block *sb) {struct hfs_inode_info *ei; - ei = (struct hfs_inode_info *)kmem_cache_alloc (hfs_inode_cachep,SLAB_KERNEL ); + ei = (struct hfs_inode_info *)kmem_cache_alloc (hfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/hpfs/super.c +1 -1
@@ -164,7 +164,7 @@ static kmem_cache_t * hpfs_inode_cachep;static struct inode *hpfs_alloc_inode (struct super_block *sb) {struct hpfs_inode_info *ei; - ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,SLAB_KERNEL ); + ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
fs/inode.c +1 -1
@@ -97,7 +97,7 @@ static struct inode *alloc_inode(structif (sb->s_op->alloc_inode) inode = sb->s_op->alloc_inode (sb);else - inode = (struct inode *)kmem_cache_alloc (inode_cachep,SLAB_KERNEL ); + inode = (struct inode *)kmem_cache_alloc (inode_cachep,GFP_KERNEL );if (inode) {struct address_space *const mapping = &inode->i_data;
fs/intermezzo/dcache.c +1 -1
@@ -234,7 +234,7 @@ inline struct presto_dentry_data *izo_al {struct presto_dentry_data *dd; - dd =kmem_cache_alloc (presto_dentry_slab,SLAB_KERNEL ); + dd =kmem_cache_alloc (presto_dentry_slab,GFP_KERNEL );if (dd ==NULL ) {CERROR ("IZO: out of memory trying to allocate presto_dentry_data\n" );return NULL ;
fs/isofs/inode.c +1 -1
@@ -81,7 +81,7 @@ static kmem_cache_t *isofs_inode_cachep;static struct inode *isofs_alloc_inode (struct super_block *sb) {struct iso_inode_info *ei; - ei = (struct iso_inode_info *)kmem_cache_alloc (isofs_inode_cachep,SLAB_KERNEL ); + ei = (struct iso_inode_info *)kmem_cache_alloc (isofs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/jffs/jffs_fm.c +2 -2
@@ -706,7 +706,7 @@ struct jffs_fm *jffs_alloc_fm(void) {struct jffs_fm *fm; - fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); + fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); DJM(if (fm) no_jffs_fm++;);return fm;
@@ -724,7 +724,7 @@ struct jffs_node *jffs_alloc_node(void) {struct jffs_node *n; - n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL ); + n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL );if (n !=NULL ) no_jffs_node++;return n;
fs/jffs2/super.c +1 -1
@@ -36,7 +36,7 @@ static kmem_cache_t *jffs2_inode_cachep;static struct inode *jffs2_alloc_inode (struct super_block *sb) {struct jffs2_inode_info *ei; - ei = (struct jffs2_inode_info *)kmem_cache_alloc (jffs2_inode_cachep,SLAB_KERNEL ); + ei = (struct jffs2_inode_info *)kmem_cache_alloc (jffs2_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/locks.c +1 -1
@@ -148,7 +148,7 @@ static struct file_lock *locks_alloc_locstruct file_lock *fl;if (account && current->locks >= current->rlim[RLIMIT_LOCKS ].rlim_cur)return NULL ; - fl =kmem_cache_alloc (filelock_cache,SLAB_KERNEL ); + fl =kmem_cache_alloc (filelock_cache,GFP_KERNEL );if (fl) current->locks++;return fl;
fs/minix/inode.c +1 -1
@@ -55,7 +55,7 @@ static kmem_cache_t * minix_inode_cachepstatic struct inode *minix_alloc_inode (struct super_block *sb) {struct minix_inode_info *ei; - ei = (struct minix_inode_info *)kmem_cache_alloc (minix_inode_cachep,SLAB_KERNEL ); + ei = (struct minix_inode_info *)kmem_cache_alloc (minix_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/ncpfs/inode.c +1 -1
@@ -46,7 +46,7 @@ static kmem_cache_t * ncp_inode_cachep;static struct inode *ncp_alloc_inode (struct super_block *sb) {struct ncp_inode_info *ei; - ei = (struct ncp_inode_info *)kmem_cache_alloc (ncp_inode_cachep,SLAB_KERNEL ); + ei = (struct ncp_inode_info *)kmem_cache_alloc (ncp_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/nfs/inode.c +1 -1
@@ -1520,7 +1520,7 @@ static kmem_cache_t * nfs_inode_cachep;static struct inode *nfs_alloc_inode (struct super_block *sb) {struct nfs_inode *nfsi; - nfsi = (struct nfs_inode *)kmem_cache_alloc (nfs_inode_cachep,SLAB_KERNEL ); + nfsi = (struct nfs_inode *)kmem_cache_alloc (nfs_inode_cachep,GFP_KERNEL );if (!nfsi)return NULL ; nfsi->flags =0 ;
fs/proc/inode.c +1 -1
@@ -92,7 +92,7 @@ static struct inode *proc_alloc_inode(ststruct proc_inode *ei;struct inode *inode; - ei = (struct proc_inode *)kmem_cache_alloc (proc_inode_cachep,SLAB_KERNEL ); + ei = (struct proc_inode *)kmem_cache_alloc (proc_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->task =NULL ;
fs/qnx4/inode.c +1 -1
@@ -515,7 +515,7 @@ static kmem_cache_t *qnx4_inode_cachep;static struct inode *qnx4_alloc_inode (struct super_block *sb) {struct qnx4_inode_info *ei; - ei =kmem_cache_alloc (qnx4_inode_cachep,SLAB_KERNEL ); + ei =kmem_cache_alloc (qnx4_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/reiserfs/super.c +1 -1
@@ -414,7 +414,7 @@ static kmem_cache_t * reiserfs_inode_cacstatic struct inode *reiserfs_alloc_inode (struct super_block *sb) {struct reiserfs_inode_info *ei; - ei = (struct reiserfs_inode_info *)kmem_cache_alloc (reiserfs_inode_cachep,SLAB_KERNEL ); + ei = (struct reiserfs_inode_info *)kmem_cache_alloc (reiserfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/romfs/inode.c +1 -1
@@ -554,7 +554,7 @@ static kmem_cache_t * romfs_inode_cachepstatic struct inode *romfs_alloc_inode (struct super_block *sb) {struct romfs_inode_info *ei; - ei = (struct romfs_inode_info *)kmem_cache_alloc (romfs_inode_cachep,SLAB_KERNEL ); + ei = (struct romfs_inode_info *)kmem_cache_alloc (romfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/smbfs/inode.c +1 -1
@@ -55,7 +55,7 @@ static kmem_cache_t *smb_inode_cachep;static struct inode *smb_alloc_inode (struct super_block *sb) {struct smb_inode_info *ei; - ei = (struct smb_inode_info *)kmem_cache_alloc (smb_inode_cachep,SLAB_KERNEL ); + ei = (struct smb_inode_info *)kmem_cache_alloc (smb_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/smbfs/request.c +1 -1
@@ -60,7 +60,7 @@ static struct smb_request *smb_do_alloc_struct smb_request *req;unsigned char *buf =NULL ; - req =kmem_cache_alloc (req_cachep,SLAB_KERNEL ); + req =kmem_cache_alloc (req_cachep,GFP_KERNEL );VERBOSE ("allocating request: %p\n" , req);if (!req) goto out;
fs/sysv/inode.c +1 -1
@@ -293,7 +293,7 @@ static struct inode *sysv_alloc_inode(st {struct sysv_inode_info *si; - si =kmem_cache_alloc (sysv_inode_cachep,SLAB_KERNEL ); + si =kmem_cache_alloc (sysv_inode_cachep,GFP_KERNEL );if (!si)return NULL ;return &si->vfs_inode;
fs/udf/super.c +1 -1
@@ -117,7 +117,7 @@ static kmem_cache_t * udf_inode_cachep;static struct inode *udf_alloc_inode (struct super_block *sb) {struct udf_inode_info *ei; - ei = (struct udf_inode_info *)kmem_cache_alloc (udf_inode_cachep,SLAB_KERNEL ); + ei = (struct udf_inode_info *)kmem_cache_alloc (udf_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/ufs/super.c +1 -1
@@ -1004,7 +1004,7 @@ static kmem_cache_t * ufs_inode_cachep;static struct inode *ufs_alloc_inode (struct super_block *sb) {struct ufs_inode_info *ei; - ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,SLAB_KERNEL ); + ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
include/linux/fs.h +1 -1
@@ -1026,7 +1026,7 @@ extern char * getname(const char *);/* fs/dcache.c */ extern void vfs_caches_init (unsigned long ); -#define __getname () kmem_cache_alloc(names_cachep, SLAB_KERNEL) +#define __getname () kmem_cache_alloc(names_cachep, GFP_KERNEL)#define putname (name) kmem_cache_free(names_cachep, (void *)(name))enum {BDEV_FILE ,BDEV_SWAP ,BDEV_FS ,BDEV_RAW };
include/linux/slab.h +0 -2
@@ -17,9 +17,7 @@ typedef struct kmem_cache_s kmem_cache_t/* flags for kmem_cache_alloc() */ #define SLAB_NOFS GFP_NOFS#define SLAB_NOIO GFP_NOIO -#define SLAB_ATOMIC GFP_ATOMIC#define SLAB_USER GFP_USER -#define SLAB_KERNEL GFP_KERNEL#define SLAB_DMA GFP_DMA#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN)
include/net/tcp.h +1 -1
@@ -539,7 +539,7 @@ struct open_request {/* SLAB cache for open requests. */ extern kmem_cache_t *tcp_openreq_cachep; -#define tcp_openreq_alloc () kmem_cache_alloc(tcp_openreq_cachep, SLAB_ATOMIC) +#define tcp_openreq_alloc () kmem_cache_alloc(tcp_openreq_cachep, GFP_ATOMIC)#define tcp_openreq_fastfree (req) kmem_cache_free(tcp_openreq_cachep, req)static inline void tcp_openreq_free (struct open_request *req)
kernel/fork.c +3 -3
@@ -261,7 +261,7 @@ static inline int dup_mmap(struct mm_str goto fail_nomem; charge += len; } - tmp =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + tmp =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!tmp) goto fail_nomem; *tmp = *mpnt;
@@ -333,7 +333,7 @@ static inline void mm_free_pgd(struct mm spinlock_t mmlist_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;int mmlist_nr; -#define allocate_mm () (kmem_cache_alloc(mm_cachep, SLAB_KERNEL)) +#define allocate_mm () (kmem_cache_alloc(mm_cachep, GFP_KERNEL))#define free_mm (mm) (kmem_cache_free(mm_cachep, (mm)))#include <linux/init_task.h>
@@ -576,7 +576,7 @@ static int copy_files(unsigned long clon tsk->files =NULL ; error = -ENOMEM ; - newf =kmem_cache_alloc (files_cachep,SLAB_KERNEL ); + newf =kmem_cache_alloc (files_cachep,GFP_KERNEL );if (!newf) goto out;
kernel/user.c +1 -1
@@ -90,7 +90,7 @@ struct user_struct * alloc_uid(uid_t uidif (!up) {struct user_struct *new; - new =kmem_cache_alloc (uid_cachep,SLAB_KERNEL ); + new =kmem_cache_alloc (uid_cachep,GFP_KERNEL );if (!new)return NULL ; new->uid = uid;
mm/mmap.c +3 -3
@@ -643,7 +643,7 @@ munmap_back:* specific mapper. the address has already been validated, but * not unmapped, but the maps are removed from the list. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL ); error = -ENOMEM ;if (!vma) goto unacct_error;
@@ -1179,7 +1179,7 @@ int split_vma(struct mm_struct * mm, strif (mm->map_count >=MAX_MAP_COUNT )return -ENOMEM ; - new =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + new =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!new)return -ENOMEM ;
@@ -1346,7 +1346,7 @@ unsigned long do_brk(unsigned long addr,/* * create a vma struct for an anonymous mapping */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!vma) {vm_unacct_memory (len >>PAGE_SHIFT );return -ENOMEM ;
mm/mremap.c +1 -1
@@ -237,7 +237,7 @@ static unsigned long move_vma(struct vm_ allocated_vma =0 ;if (!new_vma) { - new_vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + new_vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!new_vma) goto out; allocated_vma =1 ;
mm/shmem.c +1 -1
@@ -1760,7 +1760,7 @@ static kmem_cache_t *shmem_inode_cachep;static struct inode *shmem_alloc_inode (struct super_block *sb) {struct shmem_inode_info *p; - p = (struct shmem_inode_info *)kmem_cache_alloc (shmem_inode_cachep,SLAB_KERNEL ); + p = (struct shmem_inode_info *)kmem_cache_alloc (shmem_inode_cachep,GFP_KERNEL );if (!p)return NULL ;return &p->vfs_inode;
mm/slab.c +1 -1
@@ -904,7 +904,7 @@ kmem_cache_create (const char *name, sizBUG ();/* Get cache's description obj. */ - cachep = (kmem_cache_t *)kmem_cache_alloc (&cache_cache,SLAB_KERNEL ); + cachep = (kmem_cache_t *)kmem_cache_alloc (&cache_cache,GFP_KERNEL );if (!cachep) goto opps;memset (cachep,0 ,sizeof (kmem_cache_t));
net/core/dst.c +1 -1
@@ -119,7 +119,7 @@ void * dst_alloc(struct dst_ops * ops)if (ops->gc ())return NULL ; } - dst =kmem_cache_alloc (ops->kmem_cachep,SLAB_ATOMIC ); + dst =kmem_cache_alloc (ops->kmem_cachep,GFP_ATOMIC );if (!dst)return NULL ;memset (dst,0 , ops->entry_size);
net/core/neighbour.c +1 -1
@@ -232,7 +232,7 @@ static struct neighbour *neigh_alloc(str goto out; } - n =kmem_cache_alloc (tbl->kmem_cachep,SLAB_ATOMIC ); + n =kmem_cache_alloc (tbl->kmem_cachep,GFP_ATOMIC );if (!n) goto out;
net/decnet/dn_table.c +1 -1
@@ -530,7 +530,7 @@ create: replace: err = -ENOBUFS ; - new_f =kmem_cache_alloc (dn_hash_kmem,SLAB_KERNEL ); + new_f =kmem_cache_alloc (dn_hash_kmem,GFP_KERNEL );if (new_f ==NULL ) goto out;
net/ipv4/fib_hash.c +1 -1
@@ -561,7 +561,7 @@ create: replace: err = -ENOBUFS ; - new_f =kmem_cache_alloc (fn_hash_kmem,SLAB_KERNEL ); + new_f =kmem_cache_alloc (fn_hash_kmem,GFP_KERNEL );if (new_f ==NULL ) goto out;
net/ipv4/tcp_ipv4.c +1 -1
@@ -129,7 +129,7 @@ struct tcp_bind_bucket *tcp_bucket_creat unsigned short snum) {struct tcp_bind_bucket *tb =kmem_cache_alloc (tcp_bucket_cachep, -SLAB_ATOMIC ); +GFP_ATOMIC );if (tb) { tb->port = snum; tb->fastreuse =0 ;
net/ipv4/tcp_minisocks.c +1 -1
@@ -354,7 +354,7 @@ void tcp_time_wait(struct sock *sk, int recycle_ok = tp->af_specific->remember_stamp (sk);if (tcp_tw_count < sysctl_tcp_max_tw_buckets) - tw =kmem_cache_alloc (tcp_timewait_cachep,SLAB_ATOMIC ); + tw =kmem_cache_alloc (tcp_timewait_cachep,GFP_ATOMIC );if (tw !=NULL ) {struct inet_opt *inet =inet_sk (sk);
net/ipv4/xfrm_input.c +1 -1
@@ -108,7 +108,7 @@ int xfrm4_rcv(struct sk_buff *skb)if (!skb->sp ||atomic_read (&skb->sp->refcnt) !=1 ) {struct sec_path *sp; - sp =kmem_cache_alloc (secpath_cachep,SLAB_ATOMIC ); + sp =kmem_cache_alloc (secpath_cachep,GFP_ATOMIC );if (!sp) goto drop;if (skb->sp) {
net/ipv4/xfrm_policy.c +1 -1
@@ -115,7 +115,7 @@ struct xfrm_policy *flow_lookup(int dir,if (flow_count (cpu) > flow_hwm)flow_cache_shrink (cpu); - fle =kmem_cache_alloc (flow_cachep,SLAB_ATOMIC ); + fle =kmem_cache_alloc (flow_cachep,GFP_ATOMIC );if (fle) {flow_count (cpu)++; fle->fl = *fl;
net/ipv6/ip6_fib.c +1 -1
@@ -211,7 +211,7 @@ static __inline__ struct fib6_node * nod {struct fib6_node *fn; -if ((fn =kmem_cache_alloc (fib6_node_kmem,SLAB_ATOMIC )) !=NULL ) +if ((fn =kmem_cache_alloc (fib6_node_kmem,GFP_ATOMIC )) !=NULL )memset (fn,0 ,sizeof (struct fib6_node ));return fn;
net/socket.c +1 -1
@@ -274,7 +274,7 @@ static kmem_cache_t * sock_inode_cachep;static struct inode *sock_alloc_inode (struct super_block *sb) {struct socket_alloc *ei; - ei = (struct socket_alloc *)kmem_cache_alloc (sock_inode_cachep,SLAB_KERNEL ); + ei = (struct socket_alloc *)kmem_cache_alloc (sock_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;init_waitqueue_head (&ei->socket.wait);
net/sunrpc/rpc_pipe.c +1 -1
@@ -108,7 +108,7 @@ static struct inode * rpc_alloc_inode(struct super_block *sb) {struct rpc_inode *rpci; - rpci = (struct rpc_inode *)kmem_cache_alloc (rpc_inode_cachep,SLAB_KERNEL ); + rpci = (struct rpc_inode *)kmem_cache_alloc (rpc_inode_cachep,GFP_KERNEL );if (!rpci)return NULL ;return &rpci->vfs_inode;
Quoted 2 lines · William Lee Irwin III
Quoted 2 lines
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.
Quoted 2 lines · Christoph Hellwig
Why? I'd prefer to completly get rid of the
SLAB_flags instead. (stupid slowaris compat..)
Kill SLAB_DMA, SLAB_NOIO, SLAB_NOFS, and SLAB_KERNEL.
Documentation/DMA-mapping.txt | 4 +- Documentation/filesystems/devfs/ChangeLog | 1 Documentation/usb/URB.txt | 2 - arch/arm/common/sa1111-pcipool.c | 6 ++-- arch/i386/mm/pgtable.c | 4 +- arch/ia64/ia32/binfmt_elf32.c | 6 ++-- arch/ia64/kernel/perfmon.c | 2 - arch/ia64/mm/init.c | 4 +- arch/s390x/kernel/exec32.c | 2 - arch/x86_64/ia32/ia32_binfmt.c | 2 - drivers/block/DAC960.c | 4 +- drivers/block/ll_rw_blk.c | 2 - drivers/ieee1394/amdtp.c | 16 +++++----- drivers/ieee1394/cmp.c | 2 - drivers/ieee1394/eth1394.c | 2 - drivers/ieee1394/hosts.c | 2 - drivers/ieee1394/iso.c | 2 - drivers/ieee1394/nodemgr.c | 2 - drivers/ieee1394/ohci1394.c | 12 ++++---- drivers/ieee1394/pcilynx.c | 2 - drivers/ieee1394/raw1394.c | 44 +++++++++++++++--------------- drivers/ieee1394/sbp2.c | 2 - drivers/pci/pool.c | 8 ++--- drivers/usb/core/buffer.c | 2 - drivers/usb/core/hub.c | 2 - drivers/usb/core/message.c | 2 - drivers/usb/host/ehci-dbg.c | 2 - drivers/usb/host/ehci-hcd.c | 2 - drivers/usb/host/ehci-q.c | 2 - drivers/usb/host/ohci-dbg.c | 2 - drivers/usb/host/ohci-q.c | 4 +- drivers/usb/host/uhci-hcd.c | 2 - drivers/usb/input/aiptek.c | 2 - drivers/usb/input/hid-core.c | 10 +++--- drivers/usb/input/powermate.c | 4 +- drivers/usb/input/usbkbd.c | 8 ++--- drivers/usb/input/usbmouse.c | 4 +- drivers/usb/input/wacom.c | 2 - drivers/usb/input/xpad.c | 2 - drivers/usb/misc/usbtest.c | 28 +++++++++---------- drivers/usb/net/catc.c | 2 - drivers/usb/net/kaweth.c | 2 - drivers/usb/net/pegasus.c | 2 - drivers/usb/net/rtl8150.c | 2 - drivers/usb/storage/transport.c | 2 - fs/adfs/super.c | 2 - fs/affs/super.c | 2 - fs/afs/super.c | 2 - fs/befs/linuxvfs.c | 2 - fs/bfs/inode.c | 2 - fs/block_dev.c | 2 - fs/char_dev.c | 2 - fs/cifs/cifsfs.c | 2 - fs/cifs/misc.c | 2 - fs/cifs/transport.c | 2 - fs/coda/inode.c | 2 - fs/devfs/base.c | 4 +- fs/dnotify.c | 2 - fs/dquot.c | 2 - fs/efs/super.c | 2 - fs/eventpoll.c | 4 +- fs/exec.c | 2 - fs/ext2/super.c | 2 - fs/ext3/super.c | 2 - fs/fat/inode.c | 2 - fs/fcntl.c | 2 - fs/file_table.c | 2 - fs/freevxfs/vxfs_fshead.c | 2 - fs/freevxfs/vxfs_inode.c | 4 +- fs/hfs/super.c | 2 - fs/hpfs/super.c | 2 - fs/inode.c | 2 - fs/intermezzo/dcache.c | 2 - fs/isofs/inode.c | 2 - fs/jffs/jffs_fm.c | 4 +- fs/jffs2/super.c | 2 - fs/locks.c | 2 - fs/minix/inode.c | 2 - fs/ncpfs/inode.c | 2 - fs/nfs/inode.c | 2 - fs/nfs/pagelist.c | 2 - fs/nfs/read.c | 2 - fs/nfs/write.c | 4 +- fs/ntfs/attrib.c | 2 - fs/ntfs/inode.c | 4 +- fs/ntfs/unistr.c | 2 - fs/proc/inode.c | 2 - fs/qnx4/inode.c | 2 - fs/reiserfs/super.c | 2 - fs/romfs/inode.c | 2 - fs/smbfs/inode.c | 2 - fs/smbfs/request.c | 2 - fs/sysv/inode.c | 2 - fs/udf/super.c | 2 - fs/ufs/super.c | 2 - include/linux/fs.h | 2 - include/linux/slab.h | 5 --- include/net/tcp.h | 2 - kernel/fork.c | 6 ++-- kernel/user.c | 2 - mm/mmap.c | 6 ++-- mm/mremap.c | 2 - mm/shmem.c | 2 - mm/slab.c | 6 ++-- net/core/dst.c | 2 - net/core/neighbour.c | 2 - net/decnet/dn_table.c | 2 - net/ipv4/fib_hash.c | 2 - net/ipv4/tcp_ipv4.c | 2 - net/ipv4/tcp_minisocks.c | 2 - net/ipv4/xfrm_input.c | 2 - net/ipv4/xfrm_policy.c | 2 - net/ipv6/ip6_fib.c | 2 - net/socket.c | 2 - net/sunrpc/rpc_pipe.c | 2 - 115 files changed, 193 insertions(+), 197 deletions(-)
Documentation/DMA-mapping.txt +2 -2
@@ -341,8 +341,8 @@ Allocate memory from a pci pool like thi cpu_addr = pci_pool_alloc(pool, flags, &dma_handle); -flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor -holding SMP locks), SLAB_ATOMIC otherwise. Like pci_alloc_consistent, +flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor +holding SMP locks), GFP_ATOMIC otherwise. Like pci_alloc_consistent, this returns two values, cpu_addr and dma_handle. Free memory that was allocated from a pci_pool like this:
Documentation/filesystems/devfs/ChangeLog +1 -1
@@ -1822,7 +1822,7 @@ Changes for patch v202 =============================================================================== Changes for patch v203 -- Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> +- Use GFP_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> =============================================================================== Changes for patch v204
Documentation/usb/URB.txt +1 -1
@@ -121,7 +121,7 @@ Just call int usb_submit_urb(struct urb *urb, int mem_flags) -The mem_flags parameter, such as SLAB_ATOMIC, controls memory allocation, +The mem_flags parameter, such as GFP_ATOMIC, controls memory allocation, such as whether the lower levels may block when memory is tight. It immediately returns, either with status 0 (request queued) or some
arch/arm/common/sa1111-pcipool.c +3 -3
@@ -110,7 +110,7 @@ pci_pool_create (const char *name, struc }else if (allocation < size)return 0 ; -if (!(retval =kmalloc (sizeof *retval,SLAB_KERNEL ))) +if (!(retval =kmalloc (sizeof *retval,GFP_KERNEL )))return retval;strncpy (retval->name, name,sizeof retval->name);
@@ -228,7 +228,7 @@ pci_pool_destroy (struct pci_pool *pool)/** * pci_pool_alloc - get a block of consistent memory * @pool: pci pool that will produce the block -* @mem_flags: SLAB_KERNEL or SLAB_ATOMIC +* @mem_flags: GFP_KERNEL or GFP_ATOMIC * @handle: pointer to dma address of block * * This returns the kernel virtual address of a currently unused block,
@@ -266,7 +266,7 @@ restart: } }if (!(page =pool_alloc_page (pool, mem_flags))) { -if (mem_flags ==SLAB_KERNEL ) { +if (mem_flags ==GFP_KERNEL ) {DECLARE_WAITQUEUE (wait, current); current->state =TASK_INTERRUPTIBLE ;
arch/i386/mm/pgtable.c +2 -2
@@ -188,7 +188,7 @@ void pgd_ctor(void *__pgd, kmem_cache_tpgd_t *pgd_alloc (struct mm_struct *mm) {int i; -pgd_t *pgd =kmem_cache_alloc (pgd_cache,SLAB_KERNEL ); +pgd_t *pgd =kmem_cache_alloc (pgd_cache,GFP_KERNEL );if (PTRS_PER_PMD ==1 )return pgd;
@@ -196,7 +196,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)return NULL ;for (i =0 ; i <USER_PTRS_PER_PGD ; ++i) { -pmd_t *pmd =kmem_cache_alloc (pmd_cache,SLAB_KERNEL ); +pmd_t *pmd =kmem_cache_alloc (pmd_cache,GFP_KERNEL );if (!pmd) goto out_oom;set_pgd (pgd + i,__pgd (1 +__pa ((unsigned long long )((unsigned long )pmd))));
arch/ia64/ia32/binfmt_elf32.c +3 -3
@@ -79,7 +79,7 @@ ia64_elf32_init (struct pt_regs *regs)* it with privilege level 3 because the IVE uses non-privileged accesses to these * tables. IA-32 segmentation is used to protect against IA-32 accesses to them. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA32_GDT_OFFSET ;
@@ -101,7 +101,7 @@ ia64_elf32_init (struct pt_regs *regs)* Install LDT as anonymous memory. This gives us all-zero segment descriptors * until a task modifies them via modify_ldt(). */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA32_LDT_OFFSET ;
@@ -172,7 +172,7 @@ ia32_setup_arg_pages (struct linux_binpr bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
arch/ia64/kernel/perfmon.c +1 -1
@@ -796,7 +796,7 @@ pfm_smpl_buffer_alloc(pfm_context_t *ctx }/* allocate vma */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!vma) {DBprintk (("Cannot allocate vma\n" )); goto error_kmem;
arch/ia64/mm/init.c +2 -2
@@ -74,7 +74,7 @@ ia64_init_addr_space (void)* the problem. When the process attempts to write to the register backing store * for the first time, it will get a SEGFAULT in this case. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA64_RBS_BOT ;
@@ -90,7 +90,7 @@ ia64_init_addr_space (void)/* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ if (!(current->personality &MMAP_PAGE_ZERO )) { - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) {memset (vma,0 ,sizeof (*vma)); vma->vm_mm = current->mm;
arch/s390x/kernel/exec32.c +1 -1
@@ -51,7 +51,7 @@ int setup_arg_pages32(struct linux_binpr bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
arch/x86_64/ia32/ia32_binfmt.c +1 -1
@@ -290,7 +290,7 @@ int setup_arg_pages(struct linux_binprm bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
drivers/block/DAC960.c +2 -2
@@ -251,13 +251,13 @@ static boolean DAC960_CreateAuxiliaryStr Command->Next = Controller->FreeCommands; Controller->FreeCommands = Command; Controller->Commands[CommandIdentifier-1 ] = Command; - ScatterGatherCPU =pci_pool_alloc (ScatterGatherPool,SLAB_ATOMIC , + ScatterGatherCPU =pci_pool_alloc (ScatterGatherPool,GFP_ATOMIC , &ScatterGatherDMA);if (ScatterGatherCPU ==NULL )return DAC960_Failure (Controller,"AUXILIARY STRUCTURE CREATION" );if (RequestSensePool !=NULL ) { - RequestSenseCPU =pci_pool_alloc (RequestSensePool,SLAB_ATOMIC , + RequestSenseCPU =pci_pool_alloc (RequestSensePool,GFP_ATOMIC , &RequestSenseDMA);if (RequestSenseCPU ==NULL ) { pci_pool_free(ScatterGatherPool, ScatterGatherCPU,
drivers/block/ll_rw_blk.c +1 -1
@@ -1222,7 +1222,7 @@ static int blk_init_free_list(request_qu*/ rl = &q->rq[READ ];for (i =0 ; i < (queue_nr_requests*2 ); i++) { - rq =kmem_cache_alloc (request_cachep,SLAB_KERNEL ); + rq =kmem_cache_alloc (request_cachep,GFP_KERNEL );if (!rq) goto nomem;
drivers/ieee1394/amdtp.c +8 -8
@@ -558,15 +558,15 @@ struct packet_list *packet_list_alloc(ststruct packet_list *pl;struct packet *next; - pl =kmalloc (sizeof *pl,SLAB_KERNEL ); + pl =kmalloc (sizeof *pl,GFP_KERNEL );if (pl ==NULL )return NULL ;for (i =0 ; i <PACKET_LIST_SIZE ; i++) {struct packet *p = &pl->packets[i]; - p->db =pci_pool_alloc (s->descriptor_pool,SLAB_KERNEL , + p->db =pci_pool_alloc (s->descriptor_pool,GFP_KERNEL , &p->db_bus); - p->payload =pci_pool_alloc (s->packet_pool,SLAB_KERNEL , + p->payload =pci_pool_alloc (s->packet_pool,GFP_KERNEL , &p->payload_bus); }
@@ -597,7 +597,7 @@ static struct buffer *buffer_alloc(int s {struct buffer *b; - b =kmalloc (sizeof *b + size,SLAB_KERNEL ); + b =kmalloc (sizeof *b + size,GFP_KERNEL ); b->head =0 ; b->tail =0 ; b->length =0 ;
@@ -834,7 +834,7 @@ static int stream_alloc_packet_lists(str max_packet_size = max_nevents * s->dimension *4 +8 ; s->packet_pool =hpsb_pci_pool_create ("packet pool" , s->host->ohci->dev, - max_packet_size,0 ,0 ,SLAB_KERNEL ); + max_packet_size,0 ,0 ,GFP_KERNEL );if (s->packet_pool ==NULL )return -1 ;
@@ -1006,7 +1006,7 @@ struct stream *stream_alloc(struct amdtpstruct stream *s;unsigned long flags; - s =kmalloc (sizeof (struct stream ),SLAB_KERNEL ); + s =kmalloc (sizeof (struct stream ),GFP_KERNEL );if (s ==NULL )return NULL ;
@@ -1021,7 +1021,7 @@ struct stream *stream_alloc(struct amdtp s->descriptor_pool =hpsb_pci_pool_create ("descriptor pool" , host->ohci->dev,sizeof (struct descriptor_block ), -16 ,0 ,SLAB_KERNEL ); +16 ,0 ,GFP_KERNEL );if (s->descriptor_pool ==NULL ) {kfree (s->input);
@@ -1212,7 +1212,7 @@ static void amdtp_add_host(struct hpsb_hif (strcmp (host->driver->name,OHCI1394_DRIVER_NAME ) !=0 )return ; - ah =kmalloc (sizeof *ah,in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + ah =kmalloc (sizeof *ah,in_interrupt () ?GFP_ATOMIC :GFP_KERNEL ); ah->host = host; ah->ohci = host->hostdata;INIT_LIST_HEAD (&ah->stream_list);
drivers/ieee1394/cmp.c +1 -1
@@ -159,7 +159,7 @@ static void cmp_add_host(struct hpsb_hos {struct cmp_host *ch; - ch =kmalloc (sizeof *ch,in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + ch =kmalloc (sizeof *ch,in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (ch ==NULL ) {HPSB_ERR ("Failed to allocate cmp_host" );return ;
drivers/ieee1394/eth1394.c +1 -1
@@ -360,7 +360,7 @@ static void ether1394_add_host (struct h priv->host = host; hi = (struct host_info *)kmalloc (sizeof (struct host_info ), -in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); +in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (hi ==NULL ) goto out;
drivers/ieee1394/hosts.c +1 -1
@@ -123,7 +123,7 @@ struct hpsb_host *hpsb_alloc_host(structstruct hpsb_host *h;int i; - h =kmalloc (sizeof (struct hpsb_host ) + extra,SLAB_KERNEL ); + h =kmalloc (sizeof (struct hpsb_host ) + extra,GFP_KERNEL );if (!h)return NULL ;memset (h,0 ,sizeof (struct hpsb_host ) + extra);
drivers/ieee1394/iso.c +1 -1
@@ -80,7 +80,7 @@ static struct hpsb_iso* hpsb_iso_common_/* allocate and write the struct hpsb_iso */ - iso =kmalloc (sizeof (*iso),SLAB_KERNEL ); + iso =kmalloc (sizeof (*iso),GFP_KERNEL );if (!iso)return NULL ;
drivers/ieee1394/nodemgr.c +1 -1
@@ -1325,7 +1325,7 @@ static void nodemgr_add_host(struct hpsbstruct host_info *hi;unsigned long flags; - hi =kmalloc (sizeof (struct host_info ),in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + hi =kmalloc (sizeof (struct host_info ),in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (!hi) {HPSB_ERR ("NodeMgr: out of memory in add host" );
drivers/ieee1394/ohci1394.c +6 -6
@@ -1056,7 +1056,7 @@ static int ohci_iso_recv_init(struct hpsint ctx;int ret = -ENOMEM ; - recv =kmalloc (sizeof (*recv),SLAB_KERNEL ); + recv =kmalloc (sizeof (*recv),GFP_KERNEL );if (!recv)return -ENOMEM ;
@@ -1416,7 +1416,7 @@ static int ohci_iso_xmit_init(struct hpsint ctx;int ret = -ENOMEM ; - xmit =kmalloc (sizeof (*xmit),SLAB_KERNEL ); + xmit =kmalloc (sizeof (*xmit),GFP_KERNEL );if (!xmit)return -ENOMEM ;
@@ -2394,7 +2394,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, } d->prg_pool =hpsb_pci_pool_create ("ohci1394 rcv prg" , ohci->dev, -sizeof (struct dma_cmd ),4 ,0 ,SLAB_KERNEL ); +sizeof (struct dma_cmd ),4 ,0 ,GFP_KERNEL );OHCI_DMA_ALLOC ("dma_rcv prg pool" );for (i=0 ; i<d->num_desc; i++) {
@@ -2412,7 +2412,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci,return -ENOMEM ; } - d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,SLAB_KERNEL , d->prg_bus+i); + d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,GFP_KERNEL , d->prg_bus+i);OHCI_DMA_ALLOC ("pool dma_rcv prg[%d]" , i);if (d->prg_cpu[i] !=NULL ) {
@@ -2503,11 +2503,11 @@ alloc_dma_trm_ctx(struct ti_ohci *ohci,memset (d->prg_bus,0 , d->num_desc *sizeof (dma_addr_t)); d->prg_pool =hpsb_pci_pool_create ("ohci1394 trm prg" , ohci->dev, -sizeof (struct at_dma_prg ),4 ,0 ,SLAB_KERNEL ); +sizeof (struct at_dma_prg ),4 ,0 ,GFP_KERNEL );OHCI_DMA_ALLOC ("dma_rcv prg pool" );for (i =0 ; i < d->num_desc; i++) { - d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,SLAB_KERNEL , d->prg_bus+i); + d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,GFP_KERNEL , d->prg_bus+i);OHCI_DMA_ALLOC ("pool dma_trm prg[%d]" , i);if (d->prg_cpu[i] !=NULL ) {
drivers/ieee1394/pcilynx.c +1 -1
@@ -865,7 +865,7 @@ static int mem_open(struct inode *inode, type = t_ram; } - md = (struct memdata *)kmalloc (sizeof (struct memdata ),SLAB_KERNEL ); + md = (struct memdata *)kmalloc (sizeof (struct memdata ),GFP_KERNEL );if (md ==NULL )return -ENOMEM ;
drivers/ieee1394/raw1394.c +22 -22
171 lines not on this page · raw message
drivers/ieee1394/sbp2.c +1 -1
@@ -1011,7 +1011,7 @@ static void sbp2_add_host(struct hpsb_ho/* Allocate some memory for our host info structure */ hi = (struct sbp2scsi_host_info *)kmalloc (sizeof (struct sbp2scsi_host_info ), -in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); +in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (hi ==NULL ) {SBP2_ERR ("out of memory in sbp2_add_host" );
drivers/pci/pool.c +4 -4
@@ -125,7 +125,7 @@ pci_pool_create (const char *name, struc }else if (allocation < size)return 0 ; -if (!(retval =kmalloc (sizeof *retval,SLAB_KERNEL ))) +if (!(retval =kmalloc (sizeof *retval,GFP_KERNEL )))return retval;strncpy (retval->name, name,sizeof retval->name);
@@ -249,7 +249,7 @@ pci_pool_destroy (struct pci_pool *pool)/** * pci_pool_alloc - get a block of consistent memory * @pool: pci pool that will produce the block -* @mem_flags: SLAB_KERNEL or SLAB_ATOMIC +* @mem_flags: GFP_KERNEL or GFP_ATOMIC * @handle: pointer to dma address of block * * This returns the kernel virtual address of a currently unused block,
@@ -286,8 +286,8 @@ restart: } } } -if (!(page =pool_alloc_page (pool,SLAB_ATOMIC ))) { -if (mem_flags ==SLAB_KERNEL ) { +if (!(page =pool_alloc_page (pool,GFP_ATOMIC ))) { +if (mem_flags ==GFP_KERNEL ) {DECLARE_WAITQUEUE (wait, current); current->state =TASK_INTERRUPTIBLE ;
drivers/usb/core/buffer.c +1 -1
@@ -97,7 +97,7 @@ void hcd_buffer_destroy (struct usb_hcdEXPORT_SYMBOL (hcd_buffer_destroy); -/* sometimes alloc/free could use kmalloc with SLAB_DMA, for +/* sometimes alloc/free could use kmalloc with GFP_DMA, for * better sharing and to leverage mm/slab.c intelligence. */
drivers/usb/core/hub.c +1 -1
@@ -233,7 +233,7 @@ void usb_hub_tt_clear_buffer (struct usb* since each TT has "at least two" buffers that can need it (and * there can be many TTs per hub). even if they're uncommon. */ -if ((clear =kmalloc (sizeof *clear,SLAB_ATOMIC )) ==0 ) { +if ((clear =kmalloc (sizeof *clear,GFP_ATOMIC )) ==0 ) {err ("can't save CLEAR_TT_BUFFER state for hub at usb-%s-%s" , dev->bus->bus_name, tt->hub->devpath);/* FIXME recover somehow ... RESET_TT? */
drivers/usb/core/message.c +1 -1
@@ -439,7 +439,7 @@ void usb_sg_wait (struct usb_sg_requestfor (i =0 ; i < io->entries && !io->status; i++) {int retval; - retval =usb_submit_urb (io->urbs [i],SLAB_ATOMIC ); + retval =usb_submit_urb (io->urbs [i],GFP_ATOMIC );/* after we submit, let completions or cancelations fire; * we handshake using io->status.
drivers/usb/host/ehci-dbg.c +1 -1
@@ -429,7 +429,7 @@ show_periodic (struct device *dev, charchar *next;unsigned i, tag; -if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,SLAB_ATOMIC ))) +if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,GFP_ATOMIC )))return 0 ; seen_count =0 ;
drivers/usb/host/ehci-hcd.c +1 -1
@@ -361,7 +361,7 @@ static int ehci_start (struct usb_hcd *h* periodic_size can shrink by USBCMD update if hcc_params allows. */ ehci->periodic_size =DEFAULT_I_TDPS ; -if ((retval =ehci_mem_init (ehci,SLAB_KERNEL )) <0 ) +if ((retval =ehci_mem_init (ehci,GFP_KERNEL )) <0 )return retval;/* controllers may cache some of the periodic schedule ... */
drivers/usb/host/ehci-q.c +1 -1
@@ -756,7 +756,7 @@ static struct ehci_qh *qh_append_tds ( qh = (struct ehci_qh *) *ptr;if (unlikely (qh ==0 )) {/* can't sleep here, we have ehci->lock... */ - qh =qh_make (ehci, urb,SLAB_ATOMIC ); + qh =qh_make (ehci, urb,GFP_ATOMIC ); *ptr = qh; }if (likely (qh !=0 )) {
drivers/usb/host/ohci-dbg.c +1 -1
@@ -427,7 +427,7 @@ show_periodic (struct device *dev, charchar *next;unsigned i; -if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,SLAB_ATOMIC ))) +if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,GFP_ATOMIC )))return 0 ; seen_count =0 ;
drivers/usb/host/ohci-q.c +2 -2
@@ -362,7 +362,7 @@ static struct ed *ed_get (if (!(ed = dev->ep [ep])) {struct td *td; - ed =ed_alloc (ohci,SLAB_ATOMIC ); + ed =ed_alloc (ohci,GFP_ATOMIC );if (!ed) {/* out of memory */ goto done;
@@ -370,7 +370,7 @@ static struct ed *ed_get ( dev->ep [ep] = ed;/* dummy td; end of td list for ed */ - td =td_alloc (ohci,SLAB_ATOMIC ); + td =td_alloc (ohci,GFP_ATOMIC );if (!td) {/* out of memory */ ed_free (ohci, ed);
drivers/usb/host/uhci-hcd.c +1 -1
@@ -647,7 +647,7 @@ static struct urb_priv *uhci_alloc_urb_p {struct urb_priv *urbp; - urbp =kmem_cache_alloc (uhci_up_cachep,SLAB_ATOMIC ); + urbp =kmem_cache_alloc (uhci_up_cachep,GFP_ATOMIC );if (!urbp) {err ("uhci_alloc_urb_priv: couldn't allocate memory for urb_priv\n" );return NULL ;
drivers/usb/input/aiptek.c +1 -1
@@ -263,7 +263,7 @@ aiptek_probe(struct usb_interface *intf,memset (aiptek,0 ,sizeof (struct aiptek )); - aiptek->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &aiptek->data_dma); + aiptek->data =usb_buffer_alloc (dev,10 ,GFP_ATOMIC , &aiptek->data_dma);if (!aiptek->data) {kfree (aiptek);return -ENOMEM ;
drivers/usb/input/hid-core.c +5 -5
@@ -915,7 +915,7 @@ static void hid_irq_in(struct urb *urb,dbg ("nonzero status in input irq %d" , urb->status); } - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input%d, status %d", hid->dev->bus->bus_name, hid->dev->devpath,
@@ -1377,13 +1377,13 @@ struct hid_blacklist {static int hid_alloc_buffers (struct usb_device *dev,struct hid_device *hid) { -if (!(hid->inbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->inbuf_dma))) +if (!(hid->inbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->inbuf_dma)))return -1 ; -if (!(hid->outbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->outbuf_dma))) +if (!(hid->outbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->outbuf_dma)))return -1 ; -if (!(hid->cr =usb_buffer_alloc (dev,sizeof (*(hid->cr)),SLAB_ATOMIC , &hid->cr_dma))) +if (!(hid->cr =usb_buffer_alloc (dev,sizeof (*(hid->cr)),GFP_ATOMIC , &hid->cr_dma)))return -1 ; -if (!(hid->ctrlbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->ctrlbuf_dma))) +if (!(hid->ctrlbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->ctrlbuf_dma)))return -1 ;return 0 ;
drivers/usb/input/powermate.c +2 -2
@@ -270,11 +270,11 @@ static int powermate_input_event(structstatic int powermate_alloc_buffers (struct usb_device *udev,struct powermate_device *pm) { pm->data =usb_buffer_alloc (udev,POWERMATE_PAYLOAD_SIZE , -SLAB_ATOMIC , &pm->data_dma); +GFP_ATOMIC , &pm->data_dma);if (!pm->data)return -1 ; pm->configcr =usb_buffer_alloc (udev,sizeof (*(pm->configcr)), -SLAB_ATOMIC , &pm->configcr_dma); +GFP_ATOMIC , &pm->configcr_dma);if (!pm->configcr)return -1 ;
drivers/usb/input/usbkbd.c +4 -4
@@ -126,7 +126,7 @@ static void usb_kbd_irq(struct urb *urb,memcpy (kbd->old, kbd->new,8 ); resubmit: - i =usb_submit_urb (urb,SLAB_ATOMIC ); + i =usb_submit_urb (urb,GFP_ATOMIC );if (i) err ("can't resubmit intr, %s-%s/input0, status %d", kbd->usbdev->bus->bus_name,
@@ -204,11 +204,11 @@ static int usb_kbd_alloc_mem(struct usb_return -1 ;if (!(kbd->led =usb_alloc_urb (0 ,GFP_KERNEL )))return -1 ; -if (!(kbd->new =usb_buffer_alloc (dev,8 ,SLAB_ATOMIC , &kbd->new_dma))) +if (!(kbd->new =usb_buffer_alloc (dev,8 ,GFP_ATOMIC , &kbd->new_dma)))return -1 ; -if (!(kbd->cr =usb_buffer_alloc (dev,sizeof (struct usb_ctrlrequest ),SLAB_ATOMIC , &kbd->cr_dma))) +if (!(kbd->cr =usb_buffer_alloc (dev,sizeof (struct usb_ctrlrequest ),GFP_ATOMIC , &kbd->cr_dma)))return -1 ; -if (!(kbd->leds =usb_buffer_alloc (dev,1 ,SLAB_ATOMIC , &kbd->leds_dma))) +if (!(kbd->leds =usb_buffer_alloc (dev,1 ,GFP_ATOMIC , &kbd->leds_dma)))return -1 ;return 0 ;
drivers/usb/input/usbmouse.c +2 -2
@@ -90,7 +90,7 @@ static void usb_mouse_irq(struct urb *urinput_sync (dev); resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input0, status %d", mouse->usbdev->bus->bus_name,
@@ -149,7 +149,7 @@ static int usb_mouse_probe(struct usb_inreturn -ENOMEM ;memset (mouse,0 ,sizeof (struct usb_mouse )); - mouse->data =usb_buffer_alloc (dev,8 ,SLAB_ATOMIC , &mouse->data_dma); + mouse->data =usb_buffer_alloc (dev,8 ,GFP_ATOMIC , &mouse->data_dma);if (!mouse->data) {kfree (mouse);return -ENOMEM ;
drivers/usb/input/wacom.c +1 -1
@@ -507,7 +507,7 @@ static int wacom_probe(struct usb_interfreturn -ENOMEM ;memset (wacom,0 ,sizeof (struct wacom )); - wacom->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &wacom->data_dma); + wacom->data =usb_buffer_alloc (dev,10 ,GFP_ATOMIC , &wacom->data_dma);if (!wacom->data) {kfree (wacom);return -ENOMEM ;
drivers/usb/input/xpad.c +1 -1
@@ -239,7 +239,7 @@ static int xpad_probe(struct usb_interfamemset (xpad,0 ,sizeof (struct usb_xpad )); xpad->idata =usb_buffer_alloc (udev,XPAD_PKT_LEN , -SLAB_ATOMIC , &xpad->idata_dma); +GFP_ATOMIC , &xpad->idata_dma);if (!xpad->idata) {kfree (xpad);return -ENOMEM ;
drivers/usb/misc/usbtest.c +14 -14
@@ -100,7 +100,7 @@ static struct urb *simple_alloc_urb (if (bytes <0 )return 0 ; - urb =usb_alloc_urb (0 ,SLAB_KERNEL ); + urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!urb)return urb;usb_fill_bulk_urb (urb, udev, pipe,0 , bytes, simple_callback,0 );
@@ -110,7 +110,7 @@ static struct urb *simple_alloc_urb ( urb->transfer_flags =URB_NO_DMA_MAP ;if (usb_pipein (pipe)) urb->transfer_flags |=URB_SHORT_NOT_OK ; - urb->transfer_buffer =usb_buffer_alloc (udev, bytes,SLAB_KERNEL , + urb->transfer_buffer =usb_buffer_alloc (udev, bytes,GFP_KERNEL , &urb->transfer_dma);if (!urb->transfer_buffer) {usb_free_urb (urb);
@@ -141,7 +141,7 @@ static int simple_io ( urb->context = &completion;while (retval ==0 && iterations-- >0 ) {init_completion (&completion); -if ((retval =usb_submit_urb (urb,SLAB_KERNEL )) !=0 ) +if ((retval =usb_submit_urb (urb,GFP_KERNEL )) !=0 )break ;/* NOTE: no timeouts; can't be broken out of by interrupt */
@@ -198,7 +198,7 @@ alloc_sglist (int nents, int max, int vaunsigned i;unsigned size = max; - sg =kmalloc (nents *sizeof *sg,SLAB_KERNEL ); + sg =kmalloc (nents *sizeof *sg,GFP_KERNEL );if (!sg)return 0 ;memset (sg,0 , nents *sizeof *sg);
@@ -206,7 +206,7 @@ alloc_sglist (int nents, int max, int vafor (i =0 ; i < nents; i++) {char *buf; - buf =kmalloc (size,SLAB_KERNEL ); + buf =kmalloc (size,GFP_KERNEL );if (!buf) {free_sglist (sg, i);return 0 ;
@@ -245,7 +245,7 @@ static int perform_sglist ( (udev->speed ==USB_SPEED_HIGH ) ? (INTERRUPT_RATE <<3 ) :INTERRUPT_RATE , - sg, nents, 0, SLAB_KERNEL); + sg, nents, 0, GFP_KERNEL);if (retval)break ;
@@ -658,7 +658,7 @@ error:/* resubmit if we need to, else mark this as done */ if ((status ==0 ) && (ctx->pending < ctx->count)) { -if ((status =usb_submit_urb (urb,SLAB_ATOMIC )) !=0 ) { +if ((status =usb_submit_urb (urb,GFP_ATOMIC )) !=0 ) {dbg ("can't resubmit ctrl %02x.%02x, err %d" , reqp->bRequestType, reqp->bRequest, status); urb->dev =0 ;
@@ -693,7 +693,7 @@ test_ctrl_queue (struct usbtest_dev *dev* as with bulk/intr sglists, sglen is the queue depth; it also * controls which subtests run (more tests than sglen) or rerun. */ - urb =kmalloc (param->sglen *sizeof (struct urb *),SLAB_KERNEL ); + urb =kmalloc (param->sglen *sizeof (struct urb *),GFP_KERNEL );if (!urb) goto cleanup;memset (urb,0 , param->sglen *sizeof (struct urb *));
@@ -793,7 +793,7 @@ test_ctrl_queue (struct usbtest_dev *devif (!u) goto cleanup; - reqp =usb_buffer_alloc (udev,sizeof req,SLAB_KERNEL , + reqp =usb_buffer_alloc (udev,sizeof req,GFP_KERNEL , &u->setup_dma);if (!reqp) goto cleanup;
@@ -809,7 +809,7 @@ test_ctrl_queue (struct usbtest_dev *dev context.urb = urb;spin_lock_irq (&context.lock);for (i =0 ; i < param->sglen; i++) { - context.status =usb_submit_urb (urb [i],SLAB_ATOMIC ); + context.status =usb_submit_urb (urb [i],GFP_ATOMIC );if (context.status !=0 ) {dbg ("can't submit urb[%d], status %d" , i, context.status);
@@ -849,7 +849,7 @@ static void unlink1_callback (struct urb// we "know" -EPIPE (stall) never happens if (!status) - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) {if (status == -ECONNRESET || status == -ENOENT ) status =0 ;
@@ -877,7 +877,7 @@ static int unlink1 (struct usbtest_dev ** FIXME want additional tests for when endpoint is STALLing * due to errors, or is just NAKing requests. */ -if ((retval =usb_submit_urb (urb,SLAB_KERNEL )) !=0 ) { +if ((retval =usb_submit_urb (urb,GFP_KERNEL )) !=0 ) {dbg ("submit/unlink fail %d" , retval);return retval; }
@@ -1214,7 +1214,7 @@ usbtest_probe (struct usb_interface *int }#endif - dev =kmalloc (sizeof *dev,SLAB_KERNEL ); + dev =kmalloc (sizeof *dev,GFP_KERNEL );if (!dev)return -ENOMEM ;memset (dev,0 ,sizeof *dev);
@@ -1229,7 +1229,7 @@ usbtest_probe (struct usb_interface *int dev->intf = intf;/* cacheline-aligned scratch for i/o */ -if ((dev->buf =kmalloc (TBUF_SIZE ,SLAB_KERNEL )) ==0 ) { +if ((dev->buf =kmalloc (TBUF_SIZE ,GFP_KERNEL )) ==0 ) {kfree (dev);return -ENOMEM ; }
drivers/usb/net/catc.c +1 -1
@@ -343,7 +343,7 @@ static void catc_irq_done(struct urb *ur } } resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s, status %d", catc->usbdev->bus->bus_name,
drivers/usb/net/kaweth.c +1 -1
@@ -499,7 +499,7 @@ static void int_callback(struct urb *u, kaweth->linkstate = act_state; } resubmit: - status =usb_submit_urb (u,SLAB_ATOMIC ); + status =usb_submit_urb (u,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s, status %d", kaweth->dev->bus->bus_name,
drivers/usb/net/pegasus.c +1 -1
@@ -719,7 +719,7 @@ static void intr_callback(struct urb *ur } } - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status)err ("%s: can't resubmit interrupt urb, %d" , net->name, status); }
drivers/usb/net/rtl8150.c +1 -1
@@ -475,7 +475,7 @@ void intr_callback(struct urb *urb, stru/* FIXME if this doesn't do anything, don't submit the urb! */ resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input0, status %d", dev->udev->bus->bus_name,
drivers/usb/storage/transport.c +1 -1
@@ -421,7 +421,7 @@ int usb_stor_bulk_transfer_sglist(structUS_DEBUGP ("usb_stor_bulk_transfer_sglist(): xfer %u bytes, " "%d entries\n" , length, num_sg); result =usb_sg_init (us->current_sg, us->pusb_dev, pipe,0 , - sg, num_sg, length,SLAB_NOIO ); + sg, num_sg, length,GFP_NOIO );if (result) {US_DEBUGP ("usb_sg_init returned %d\n" , result);return USB_STOR_XFER_ERROR ;
fs/adfs/super.c +1 -1
@@ -210,7 +210,7 @@ static kmem_cache_t *adfs_inode_cachep;static struct inode *adfs_alloc_inode (struct super_block *sb) {struct adfs_inode_info *ei; - ei = (struct adfs_inode_info *)kmem_cache_alloc (adfs_inode_cachep,SLAB_KERNEL ); + ei = (struct adfs_inode_info *)kmem_cache_alloc (adfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/affs/super.c +1 -1
@@ -89,7 +89,7 @@ static kmem_cache_t * affs_inode_cachep;static struct inode *affs_alloc_inode (struct super_block *sb) {struct affs_inode_info *ei; - ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,SLAB_KERNEL ); + ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
fs/afs/super.c +1 -1
@@ -484,7 +484,7 @@ static struct inode *afs_alloc_inode(str {afs_vnode_t *vnode; - vnode = (afs_vnode_t *)kmem_cache_alloc (afs_inode_cachep,SLAB_KERNEL ); + vnode = (afs_vnode_t *)kmem_cache_alloc (afs_inode_cachep,GFP_KERNEL );if (!vnode)return NULL ;
fs/befs/linuxvfs.c +1 -1
@@ -282,7 +282,7 @@ befs_alloc_inode(struct super_block *sb) {struct befs_inode_info *bi; bi = (struct befs_inode_info *)kmem_cache_alloc (befs_inode_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (!bi)return NULL ;return &bi->vfs_inode;
fs/bfs/inode.c +1 -1
@@ -219,7 +219,7 @@ static kmem_cache_t * bfs_inode_cachep;static struct inode *bfs_alloc_inode (struct super_block *sb) {struct bfs_inode_info *bi; - bi =kmem_cache_alloc (bfs_inode_cachep,SLAB_KERNEL ); + bi =kmem_cache_alloc (bfs_inode_cachep,GFP_KERNEL );if (!bi)return NULL ;return &bi->vfs_inode;
fs/block_dev.c +1 -1
@@ -223,7 +223,7 @@ static spinlock_t bdev_lock __cacheline_static kmem_cache_t * bdev_cachep;#define alloc_bdev () \ - ((struct block_device *) kmem_cache_alloc(bdev_cachep, SLAB_KERNEL)) + ((struct block_device *) kmem_cache_alloc(bdev_cachep, GFP_KERNEL))#define destroy_bdev (bdev) kmem_cache_free(bdev_cachep, (bdev))static void init_once (void * foo,kmem_cache_t * cachep,unsigned long flags)
fs/char_dev.c +1 -1
@@ -35,7 +35,7 @@ static spinlock_t cdev_lock = SPIN_LOCK_static kmem_cache_t * cdev_cachep;#define alloc_cdev () \ - ((struct char_device *) kmem_cache_alloc(cdev_cachep, SLAB_KERNEL)) + ((struct char_device *) kmem_cache_alloc(cdev_cachep, GFP_KERNEL))#define destroy_cdev (cdev) kmem_cache_free(cdev_cachep, (cdev))static void init_once (void *foo,kmem_cache_t *cachep,unsigned long flags)
fs/cifs/cifsfs.c +1 -1
@@ -174,7 +174,7 @@ cifs_alloc_inode(struct super_block *sb)struct cifsInodeInfo *cifs_inode; cifs_inode = (struct cifsInodeInfo *)kmem_cache_alloc (cifs_inode_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (!cifs_inode)return NULL ; cifs_inode->cifsAttrs =0x20 ;/* default */
fs/cifs/misc.c +1 -1
@@ -153,7 +153,7 @@ buf_get(void)but it may be more efficient to always alloc same size albeit slightly larger */ ret_buf = - (struct smb_hdr *)kmem_cache_alloc (cifs_req_cachep,SLAB_KERNEL ); + (struct smb_hdr *)kmem_cache_alloc (cifs_req_cachep,GFP_KERNEL );/* clear the first few header bytes */ if (ret_buf) {
fs/cifs/transport.c +1 -1
@@ -45,7 +45,7 @@ AllocMidQEntry(struct smb_hdr *smb_buffe } temp =kmalloc (sizeof (struct mid_q_entry ),GFP_KERNEL ); temp = (struct mid_q_entry *)kmem_cache_alloc (cifs_mid_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (temp ==NULL )return temp;else {
fs/coda/inode.c +1 -1
@@ -41,7 +41,7 @@ static kmem_cache_t * coda_inode_cachep;static struct inode *coda_alloc_inode (struct super_block *sb) {struct coda_inode_info *ei; - ei = (struct coda_inode_info *)kmem_cache_alloc (coda_inode_cachep,SLAB_KERNEL ); + ei = (struct coda_inode_info *)kmem_cache_alloc (coda_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;memset (&ei->c_fid,0 ,sizeof (struct ViceFid ));
fs/devfs/base.c +2 -2
@@ -577,7 +577,7 @@ Added process group check for devfsd privileges. v1.4 20011204 Richard Gooch <[email protected]> - Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. + Use GFP_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. v1.5 20011211 Richard Gooch <[email protected]> Return old entry in <devfs_mk_dir> for 2.4.x kernels.
@@ -1407,7 +1407,7 @@ static int devfsd_notify_de (struct devfif ( !( fs_info->devfsd_event_mask & (1 << type) ) )return (FALSE);if ( ( entry =kmem_cache_alloc (devfsd_buf_cache, - atomic ?SLAB_ATOMIC :SLAB_KERNEL ) ) + atomic ?GFP_ATOMIC :GFP_KERNEL ) ) ==NULL ) {atomic_inc (&fs_info->devfsd_overrun_count);
fs/dnotify.c +1 -1
@@ -79,7 +79,7 @@ int fcntl_dirnotify(int fd, struct file inode = filp->f_dentry->d_inode;if (!S_ISDIR (inode->i_mode))return -ENOTDIR ; - dn =kmem_cache_alloc (dn_cache,SLAB_KERNEL ); + dn =kmem_cache_alloc (dn_cache,GFP_KERNEL );if (dn ==NULL )return -ENOMEM ;write_lock (&dn_lock);
fs/dquot.c +1 -1
@@ -474,7 +474,7 @@ static struct dquot *get_empty_dquot(str {struct dquot *dquot; - dquot =kmem_cache_alloc (dquot_cachep,SLAB_KERNEL ); + dquot =kmem_cache_alloc (dquot_cachep,GFP_KERNEL );if (!dquot)return NODQUOT ;
fs/efs/super.c +1 -1
@@ -34,7 +34,7 @@ static kmem_cache_t * efs_inode_cachep;static struct inode *efs_alloc_inode (struct super_block *sb) {struct efs_inode_info *ei; - ei = (struct efs_inode_info *)kmem_cache_alloc (efs_inode_cachep,SLAB_KERNEL ); + ei = (struct efs_inode_info *)kmem_cache_alloc (efs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/eventpoll.c +2 -2
@@ -81,13 +81,13 @@ ((1 << (hbits)) % EP_HENTRY_X_PAGE ? 1: 0)))/* Macro to allocate a "struct epitem" from the slab cache */ -#define EPI_MEM_ALLOC () (struct epitem *) kmem_cache_alloc(epi_cache, SLAB_KERNEL) +#define EPI_MEM_ALLOC () (struct epitem *) kmem_cache_alloc(epi_cache, GFP_KERNEL)/* Macro to free a "struct epitem" to the slab cache */ #define EPI_MEM_FREE (p) kmem_cache_free(epi_cache, p)/* Macro to allocate a "struct eppoll_entry" from the slab cache */ -#define PWQ_MEM_ALLOC () (struct eppoll_entry *) kmem_cache_alloc(pwq_cache, SLAB_KERNEL) +#define PWQ_MEM_ALLOC () (struct eppoll_entry *) kmem_cache_alloc(pwq_cache, GFP_KERNEL)/* Macro to free a "struct eppoll_entry" to the slab cache */ #define PWQ_MEM_FREE (p) kmem_cache_free(pwq_cache, p)
fs/exec.c +1 -1
@@ -388,7 +388,7 @@ int setup_arg_pages(struct linux_binprm bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
fs/ext2/super.c +1 -1
@@ -154,7 +154,7 @@ static kmem_cache_t * ext2_inode_cachep;static struct inode *ext2_alloc_inode (struct super_block *sb) {struct ext2_inode_info *ei; - ei = (struct ext2_inode_info *)kmem_cache_alloc (ext2_inode_cachep,SLAB_KERNEL ); + ei = (struct ext2_inode_info *)kmem_cache_alloc (ext2_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;#ifdef CONFIG_EXT2_FS_POSIX_ACL
fs/ext3/super.c +1 -1
@@ -429,7 +429,7 @@ static struct inode *ext3_alloc_inode(st {struct ext3_inode_info *ei; - ei =kmem_cache_alloc (ext3_inode_cachep,SLAB_NOFS ); + ei =kmem_cache_alloc (ext3_inode_cachep,GFP_NOFS );if (!ei)return NULL ;#ifdef CONFIG_EXT3_FS_POSIX_ACL
fs/fat/inode.c +1 -1
@@ -672,7 +672,7 @@ static kmem_cache_t *fat_inode_cachep;static struct inode *fat_alloc_inode (struct super_block *sb) {struct msdos_inode_info *ei; - ei = (struct msdos_inode_info *)kmem_cache_alloc (fat_inode_cachep,SLAB_KERNEL ); + ei = (struct msdos_inode_info *)kmem_cache_alloc (fat_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/fcntl.c +1 -1
@@ -550,7 +550,7 @@ int fasync_helper(int fd, struct file *int result =0 ;if (on) { - new =kmem_cache_alloc (fasync_cache,SLAB_KERNEL ); + new =kmem_cache_alloc (fasync_cache,GFP_KERNEL );if (!new)return -ENOMEM ; }
fs/file_table.c +1 -1
@@ -74,7 +74,7 @@ struct file * get_empty_filp(void)*/ if (files_stat.nr_files < files_stat.max_files) {file_list_unlock (); - f =kmem_cache_alloc (filp_cachep,SLAB_KERNEL ); + f =kmem_cache_alloc (filp_cachep,GFP_KERNEL );file_list_lock ();if (f) { files_stat.nr_files++;
fs/freevxfs/vxfs_fshead.c +1 -1
@@ -83,7 +83,7 @@ vxfs_getfsh(struct inode *ip, int which)if (buffer_mapped (bp)) {struct vxfs_fsh *fhp; -if (!(fhp =kmalloc (sizeof (*fhp),SLAB_KERNEL ))) +if (!(fhp =kmalloc (sizeof (*fhp),GFP_KERNEL )))return NULL ;memcpy (fhp, bp->b_data,sizeof (*fhp));
fs/freevxfs/vxfs_inode.c +2 -2
@@ -114,7 +114,7 @@ vxfs_blkiget(struct super_block *sbp, u_struct vxfs_inode_info *vip;struct vxfs_dinode *dip; -if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,SLAB_KERNEL ))) +if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,GFP_KERNEL ))) goto fail; dip = (struct vxfs_dinode *)(bp->b_data + offset);memcpy (vip, dip,sizeof (*vip));
@@ -156,7 +156,7 @@ __vxfs_iget(ino_t ino, struct inode *ilistruct vxfs_dinode *dip;caddr_t kaddr = (char *)page_address (pp); -if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,SLAB_KERNEL ))) +if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,GFP_KERNEL ))) goto fail; dip = (struct vxfs_dinode *)(kaddr + offset);memcpy (vip, dip,sizeof (*vip));
fs/hfs/super.c +1 -1
@@ -48,7 +48,7 @@ static kmem_cache_t * hfs_inode_cachep;static struct inode *hfs_alloc_inode (struct super_block *sb) {struct hfs_inode_info *ei; - ei = (struct hfs_inode_info *)kmem_cache_alloc (hfs_inode_cachep,SLAB_KERNEL ); + ei = (struct hfs_inode_info *)kmem_cache_alloc (hfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/hpfs/super.c +1 -1
@@ -164,7 +164,7 @@ static kmem_cache_t * hpfs_inode_cachep;static struct inode *hpfs_alloc_inode (struct super_block *sb) {struct hpfs_inode_info *ei; - ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,SLAB_KERNEL ); + ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
fs/inode.c +1 -1
@@ -97,7 +97,7 @@ static struct inode *alloc_inode(structif (sb->s_op->alloc_inode) inode = sb->s_op->alloc_inode (sb);else - inode = (struct inode *)kmem_cache_alloc (inode_cachep,SLAB_KERNEL ); + inode = (struct inode *)kmem_cache_alloc (inode_cachep,GFP_KERNEL );if (inode) {struct address_space *const mapping = &inode->i_data;
fs/intermezzo/dcache.c +1 -1
@@ -234,7 +234,7 @@ inline struct presto_dentry_data *izo_al {struct presto_dentry_data *dd; - dd =kmem_cache_alloc (presto_dentry_slab,SLAB_KERNEL ); + dd =kmem_cache_alloc (presto_dentry_slab,GFP_KERNEL );if (dd ==NULL ) {CERROR ("IZO: out of memory trying to allocate presto_dentry_data\n" );return NULL ;
fs/isofs/inode.c +1 -1
@@ -81,7 +81,7 @@ static kmem_cache_t *isofs_inode_cachep;static struct inode *isofs_alloc_inode (struct super_block *sb) {struct iso_inode_info *ei; - ei = (struct iso_inode_info *)kmem_cache_alloc (isofs_inode_cachep,SLAB_KERNEL ); + ei = (struct iso_inode_info *)kmem_cache_alloc (isofs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/jffs/jffs_fm.c +2 -2
@@ -706,7 +706,7 @@ struct jffs_fm *jffs_alloc_fm(void) {struct jffs_fm *fm; - fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); + fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); DJM(if (fm) no_jffs_fm++;);return fm;
@@ -724,7 +724,7 @@ struct jffs_node *jffs_alloc_node(void) {struct jffs_node *n; - n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL ); + n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL );if (n !=NULL ) no_jffs_node++;return n;
fs/jffs2/super.c +1 -1
@@ -36,7 +36,7 @@ static kmem_cache_t *jffs2_inode_cachep;static struct inode *jffs2_alloc_inode (struct super_block *sb) {struct jffs2_inode_info *ei; - ei = (struct jffs2_inode_info *)kmem_cache_alloc (jffs2_inode_cachep,SLAB_KERNEL ); + ei = (struct jffs2_inode_info *)kmem_cache_alloc (jffs2_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/locks.c +1 -1
@@ -148,7 +148,7 @@ static struct file_lock *locks_alloc_locstruct file_lock *fl;if (account && current->locks >= current->rlim[RLIMIT_LOCKS ].rlim_cur)return NULL ; - fl =kmem_cache_alloc (filelock_cache,SLAB_KERNEL ); + fl =kmem_cache_alloc (filelock_cache,GFP_KERNEL );if (fl) current->locks++;return fl;
fs/minix/inode.c +1 -1
@@ -55,7 +55,7 @@ static kmem_cache_t * minix_inode_cachepstatic struct inode *minix_alloc_inode (struct super_block *sb) {struct minix_inode_info *ei; - ei = (struct minix_inode_info *)kmem_cache_alloc (minix_inode_cachep,SLAB_KERNEL ); + ei = (struct minix_inode_info *)kmem_cache_alloc (minix_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/ncpfs/inode.c +1 -1
@@ -46,7 +46,7 @@ static kmem_cache_t * ncp_inode_cachep;static struct inode *ncp_alloc_inode (struct super_block *sb) {struct ncp_inode_info *ei; - ei = (struct ncp_inode_info *)kmem_cache_alloc (ncp_inode_cachep,SLAB_KERNEL ); + ei = (struct ncp_inode_info *)kmem_cache_alloc (ncp_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/nfs/inode.c +1 -1
@@ -1520,7 +1520,7 @@ static kmem_cache_t * nfs_inode_cachep;static struct inode *nfs_alloc_inode (struct super_block *sb) {struct nfs_inode *nfsi; - nfsi = (struct nfs_inode *)kmem_cache_alloc (nfs_inode_cachep,SLAB_KERNEL ); + nfsi = (struct nfs_inode *)kmem_cache_alloc (nfs_inode_cachep,GFP_KERNEL );if (!nfsi)return NULL ; nfsi->flags =0 ;
fs/nfs/pagelist.c +1 -1
@@ -32,7 +32,7 @@ static inline struct nfs_page *nfs_page_alloc (void) {struct nfs_page *p; - p =kmem_cache_alloc (nfs_page_cachep,SLAB_NOFS ); + p =kmem_cache_alloc (nfs_page_cachep,GFP_NOFS );if (p) {memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->wb_list);
fs/nfs/read.c +1 -1
@@ -44,7 +44,7 @@ static mempool_t *nfs_rdata_mempool;static __inline__struct nfs_read_data *nfs_readdata_alloc (void ) {struct nfs_read_data *p; - p = (struct nfs_read_data *)mempool_alloc (nfs_rdata_mempool,SLAB_NOFS ); + p = (struct nfs_read_data *)mempool_alloc (nfs_rdata_mempool,GFP_NOFS );if (p) {memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->pages);
fs/nfs/write.c +2 -2
@@ -83,7 +83,7 @@ static mempool_t *nfs_commit_mempool;static __inline__struct nfs_write_data *nfs_writedata_alloc (void ) {struct nfs_write_data *p; - p = (struct nfs_write_data *)mempool_alloc (nfs_wdata_mempool,SLAB_NOFS ); + p = (struct nfs_write_data *)mempool_alloc (nfs_wdata_mempool,GFP_NOFS );if (p) {memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->pages);
@@ -105,7 +105,7 @@ void nfs_writedata_release(struct rpc_tastatic __inline__struct nfs_write_data *nfs_commit_alloc (void ) {struct nfs_write_data *p; - p = (struct nfs_write_data *)mempool_alloc (nfs_commit_mempool,SLAB_NOFS ); + p = (struct nfs_write_data *)mempool_alloc (nfs_commit_mempool,GFP_NOFS );if (p) {memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->pages);
fs/ntfs/attrib.c +1 -1
@@ -1694,7 +1694,7 @@ attr_search_context *get_attr_search_ctx {attr_search_context *ctx; - ctx =kmem_cache_alloc (ntfs_attr_ctx_cache,SLAB_NOFS ); + ctx =kmem_cache_alloc (ntfs_attr_ctx_cache,GFP_NOFS );if (ctx)init_attr_search_ctx (ctx, ni, mrec);return ctx;
fs/ntfs/inode.c +2 -2
@@ -267,7 +267,7 @@ struct inode *ntfs_alloc_big_inode(strucntfs_debug ("Entering." ); ni = (ntfs_inode *)kmem_cache_alloc (ntfs_big_inode_cache, -SLAB_NOFS ); +GFP_NOFS );if (likely (ni !=NULL )) { ni->state =0 ;return VFS_I (ni);
@@ -292,7 +292,7 @@ static inline ntfs_inode *ntfs_alloc_extntfs_inode *ni;ntfs_debug ("Entering." ); - ni = (ntfs_inode *)kmem_cache_alloc (ntfs_inode_cache,SLAB_NOFS ); + ni = (ntfs_inode *)kmem_cache_alloc (ntfs_inode_cache,GFP_NOFS );if (likely (ni !=NULL )) { ni->state =0 ;return ni;
fs/ntfs/unistr.c +1 -1
@@ -261,7 +261,7 @@ int ntfs_nlstoucs(const ntfs_volume *vol/* We don't trust outside sources. */ if (ins) { - ucs = (uchar_t *)kmem_cache_alloc (ntfs_name_cache,SLAB_NOFS ); + ucs = (uchar_t *)kmem_cache_alloc (ntfs_name_cache,GFP_NOFS );if (ucs) {for (i = o =0 ; i < ins_len; i += wc_len) { wc_len = nls->char2uni(ins + i, ins_len - i,
fs/proc/inode.c +1 -1
@@ -92,7 +92,7 @@ static struct inode *proc_alloc_inode(ststruct proc_inode *ei;struct inode *inode; - ei = (struct proc_inode *)kmem_cache_alloc (proc_inode_cachep,SLAB_KERNEL ); + ei = (struct proc_inode *)kmem_cache_alloc (proc_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->task =NULL ;
fs/qnx4/inode.c +1 -1
@@ -515,7 +515,7 @@ static kmem_cache_t *qnx4_inode_cachep;static struct inode *qnx4_alloc_inode (struct super_block *sb) {struct qnx4_inode_info *ei; - ei =kmem_cache_alloc (qnx4_inode_cachep,SLAB_KERNEL ); + ei =kmem_cache_alloc (qnx4_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/reiserfs/super.c +1 -1
@@ -414,7 +414,7 @@ static kmem_cache_t * reiserfs_inode_cacstatic struct inode *reiserfs_alloc_inode (struct super_block *sb) {struct reiserfs_inode_info *ei; - ei = (struct reiserfs_inode_info *)kmem_cache_alloc (reiserfs_inode_cachep,SLAB_KERNEL ); + ei = (struct reiserfs_inode_info *)kmem_cache_alloc (reiserfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/romfs/inode.c +1 -1
@@ -554,7 +554,7 @@ static kmem_cache_t * romfs_inode_cachepstatic struct inode *romfs_alloc_inode (struct super_block *sb) {struct romfs_inode_info *ei; - ei = (struct romfs_inode_info *)kmem_cache_alloc (romfs_inode_cachep,SLAB_KERNEL ); + ei = (struct romfs_inode_info *)kmem_cache_alloc (romfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/smbfs/inode.c +1 -1
@@ -55,7 +55,7 @@ static kmem_cache_t *smb_inode_cachep;static struct inode *smb_alloc_inode (struct super_block *sb) {struct smb_inode_info *ei; - ei = (struct smb_inode_info *)kmem_cache_alloc (smb_inode_cachep,SLAB_KERNEL ); + ei = (struct smb_inode_info *)kmem_cache_alloc (smb_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/smbfs/request.c +1 -1
@@ -60,7 +60,7 @@ static struct smb_request *smb_do_alloc_struct smb_request *req;unsigned char *buf =NULL ; - req =kmem_cache_alloc (req_cachep,SLAB_KERNEL ); + req =kmem_cache_alloc (req_cachep,GFP_KERNEL );VERBOSE ("allocating request: %p\n" , req);if (!req) goto out;
fs/sysv/inode.c +1 -1
@@ -293,7 +293,7 @@ static struct inode *sysv_alloc_inode(st {struct sysv_inode_info *si; - si =kmem_cache_alloc (sysv_inode_cachep,SLAB_KERNEL ); + si =kmem_cache_alloc (sysv_inode_cachep,GFP_KERNEL );if (!si)return NULL ;return &si->vfs_inode;
fs/udf/super.c +1 -1
@@ -117,7 +117,7 @@ static kmem_cache_t * udf_inode_cachep;static struct inode *udf_alloc_inode (struct super_block *sb) {struct udf_inode_info *ei; - ei = (struct udf_inode_info *)kmem_cache_alloc (udf_inode_cachep,SLAB_KERNEL ); + ei = (struct udf_inode_info *)kmem_cache_alloc (udf_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/ufs/super.c +1 -1
@@ -1004,7 +1004,7 @@ static kmem_cache_t * ufs_inode_cachep;static struct inode *ufs_alloc_inode (struct super_block *sb) {struct ufs_inode_info *ei; - ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,SLAB_KERNEL ); + ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
include/linux/fs.h +1 -1
@@ -1026,7 +1026,7 @@ extern char * getname(const char *);/* fs/dcache.c */ extern void vfs_caches_init (unsigned long ); -#define __getname () kmem_cache_alloc(names_cachep, SLAB_KERNEL) +#define __getname () kmem_cache_alloc(names_cachep, GFP_KERNEL)#define putname (name) kmem_cache_free(names_cachep, (void *)(name))enum {BDEV_FILE ,BDEV_SWAP ,BDEV_FS ,BDEV_RAW };
include/linux/slab.h +0 -5
@@ -15,12 +15,7 @@ typedef struct kmem_cache_s kmem_cache_t#include <linux/types.h> /* flags for kmem_cache_alloc() */ -#define SLAB_NOFS GFP_NOFS -#define SLAB_NOIO GFP_NOIO -#define SLAB_ATOMIC GFP_ATOMIC#define SLAB_USER GFP_USER -#define SLAB_KERNEL GFP_KERNEL -#define SLAB_DMA GFP_DMA#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN)#define SLAB_NO_GROW 0x00001000UL/* don't grow a cache */
include/net/tcp.h +1 -1
@@ -539,7 +539,7 @@ struct open_request {/* SLAB cache for open requests. */ extern kmem_cache_t *tcp_openreq_cachep; -#define tcp_openreq_alloc () kmem_cache_alloc(tcp_openreq_cachep, SLAB_ATOMIC) +#define tcp_openreq_alloc () kmem_cache_alloc(tcp_openreq_cachep, GFP_ATOMIC)#define tcp_openreq_fastfree (req) kmem_cache_free(tcp_openreq_cachep, req)static inline void tcp_openreq_free (struct open_request *req)
kernel/fork.c +3 -3
@@ -261,7 +261,7 @@ static inline int dup_mmap(struct mm_str goto fail_nomem; charge += len; } - tmp =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + tmp =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!tmp) goto fail_nomem; *tmp = *mpnt;
@@ -333,7 +333,7 @@ static inline void mm_free_pgd(struct mm spinlock_t mmlist_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;int mmlist_nr; -#define allocate_mm () (kmem_cache_alloc(mm_cachep, SLAB_KERNEL)) +#define allocate_mm () (kmem_cache_alloc(mm_cachep, GFP_KERNEL))#define free_mm (mm) (kmem_cache_free(mm_cachep, (mm)))#include <linux/init_task.h>
@@ -576,7 +576,7 @@ static int copy_files(unsigned long clon tsk->files =NULL ; error = -ENOMEM ; - newf =kmem_cache_alloc (files_cachep,SLAB_KERNEL ); + newf =kmem_cache_alloc (files_cachep,GFP_KERNEL );if (!newf) goto out;
kernel/user.c +1 -1
@@ -90,7 +90,7 @@ struct user_struct * alloc_uid(uid_t uidif (!up) {struct user_struct *new; - new =kmem_cache_alloc (uid_cachep,SLAB_KERNEL ); + new =kmem_cache_alloc (uid_cachep,GFP_KERNEL );if (!new)return NULL ; new->uid = uid;
mm/mmap.c +3 -3
@@ -643,7 +643,7 @@ munmap_back:* specific mapper. the address has already been validated, but * not unmapped, but the maps are removed from the list. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL ); error = -ENOMEM ;if (!vma) goto unacct_error;
@@ -1179,7 +1179,7 @@ int split_vma(struct mm_struct * mm, strif (mm->map_count >=MAX_MAP_COUNT )return -ENOMEM ; - new =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + new =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!new)return -ENOMEM ;
@@ -1346,7 +1346,7 @@ unsigned long do_brk(unsigned long addr,/* * create a vma struct for an anonymous mapping */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!vma) {vm_unacct_memory (len >>PAGE_SHIFT );return -ENOMEM ;
mm/mremap.c +1 -1
@@ -237,7 +237,7 @@ static unsigned long move_vma(struct vm_ allocated_vma =0 ;if (!new_vma) { - new_vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + new_vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!new_vma) goto out; allocated_vma =1 ;
mm/shmem.c +1 -1
@@ -1760,7 +1760,7 @@ static kmem_cache_t *shmem_inode_cachep;static struct inode *shmem_alloc_inode (struct super_block *sb) {struct shmem_inode_info *p; - p = (struct shmem_inode_info *)kmem_cache_alloc (shmem_inode_cachep,SLAB_KERNEL ); + p = (struct shmem_inode_info *)kmem_cache_alloc (shmem_inode_cachep,GFP_KERNEL );if (!p)return NULL ;return &p->vfs_inode;
mm/slab.c +3 -3
@@ -904,7 +904,7 @@ kmem_cache_create (const char *name, sizBUG ();/* Get cache's description obj. */ - cachep = (kmem_cache_t *)kmem_cache_alloc (&cache_cache,SLAB_KERNEL ); + cachep = (kmem_cache_t *)kmem_cache_alloc (&cache_cache,GFP_KERNEL );if (!cachep) goto opps;memset (cachep,0 ,sizeof (kmem_cache_t));
@@ -1320,7 +1320,7 @@ static void cache_init_objs (kmem_cache_static void kmem_flagcheck (kmem_cache_t *cachep,int flags) { -if (flags &SLAB_DMA ) { +if (flags &GFP_DMA ) {if (!(cachep->gfpflags &GFP_DMA ))BUG (); }else {
@@ -1345,7 +1345,7 @@ static int cache_grow (kmem_cache_t * ca/* Be lazy and only check for valid flags here, * keeping it out of the critical path in kmem_cache_alloc(). */ -if (flags & ~(SLAB_DMA |SLAB_LEVEL_MASK |SLAB_NO_GROW )) +if (flags & ~(GFP_DMA |SLAB_LEVEL_MASK |SLAB_NO_GROW ))BUG ();if (flags &SLAB_NO_GROW )return 0 ;
net/core/dst.c +1 -1
@@ -119,7 +119,7 @@ void * dst_alloc(struct dst_ops * ops)if (ops->gc ())return NULL ; } - dst =kmem_cache_alloc (ops->kmem_cachep,SLAB_ATOMIC ); + dst =kmem_cache_alloc (ops->kmem_cachep,GFP_ATOMIC );if (!dst)return NULL ;memset (dst,0 , ops->entry_size);
net/core/neighbour.c +1 -1
@@ -232,7 +232,7 @@ static struct neighbour *neigh_alloc(str goto out; } - n =kmem_cache_alloc (tbl->kmem_cachep,SLAB_ATOMIC ); + n =kmem_cache_alloc (tbl->kmem_cachep,GFP_ATOMIC );if (!n) goto out;
net/decnet/dn_table.c +1 -1
@@ -530,7 +530,7 @@ create: replace: err = -ENOBUFS ; - new_f =kmem_cache_alloc (dn_hash_kmem,SLAB_KERNEL ); + new_f =kmem_cache_alloc (dn_hash_kmem,GFP_KERNEL );if (new_f ==NULL ) goto out;
net/ipv4/fib_hash.c +1 -1
@@ -561,7 +561,7 @@ create: replace: err = -ENOBUFS ; - new_f =kmem_cache_alloc (fn_hash_kmem,SLAB_KERNEL ); + new_f =kmem_cache_alloc (fn_hash_kmem,GFP_KERNEL );if (new_f ==NULL ) goto out;
net/ipv4/tcp_ipv4.c +1 -1
@@ -129,7 +129,7 @@ struct tcp_bind_bucket *tcp_bucket_creat unsigned short snum) {struct tcp_bind_bucket *tb =kmem_cache_alloc (tcp_bucket_cachep, -SLAB_ATOMIC ); +GFP_ATOMIC );if (tb) { tb->port = snum; tb->fastreuse =0 ;
net/ipv4/tcp_minisocks.c +1 -1
@@ -354,7 +354,7 @@ void tcp_time_wait(struct sock *sk, int recycle_ok = tp->af_specific->remember_stamp (sk);if (tcp_tw_count < sysctl_tcp_max_tw_buckets) - tw =kmem_cache_alloc (tcp_timewait_cachep,SLAB_ATOMIC ); + tw =kmem_cache_alloc (tcp_timewait_cachep,GFP_ATOMIC );if (tw !=NULL ) {struct inet_opt *inet =inet_sk (sk);
net/ipv4/xfrm_input.c +1 -1
@@ -108,7 +108,7 @@ int xfrm4_rcv(struct sk_buff *skb)if (!skb->sp ||atomic_read (&skb->sp->refcnt) !=1 ) {struct sec_path *sp; - sp =kmem_cache_alloc (secpath_cachep,SLAB_ATOMIC ); + sp =kmem_cache_alloc (secpath_cachep,GFP_ATOMIC );if (!sp) goto drop;if (skb->sp) {
net/ipv4/xfrm_policy.c +1 -1
@@ -115,7 +115,7 @@ struct xfrm_policy *flow_lookup(int dir,if (flow_count (cpu) > flow_hwm)flow_cache_shrink (cpu); - fle =kmem_cache_alloc (flow_cachep,SLAB_ATOMIC ); + fle =kmem_cache_alloc (flow_cachep,GFP_ATOMIC );if (fle) {flow_count (cpu)++; fle->fl = *fl;
net/ipv6/ip6_fib.c +1 -1
@@ -211,7 +211,7 @@ static __inline__ struct fib6_node * nod {struct fib6_node *fn; -if ((fn =kmem_cache_alloc (fib6_node_kmem,SLAB_ATOMIC )) !=NULL ) +if ((fn =kmem_cache_alloc (fib6_node_kmem,GFP_ATOMIC )) !=NULL )memset (fn,0 ,sizeof (struct fib6_node ));return fn;
net/socket.c +1 -1
@@ -274,7 +274,7 @@ static kmem_cache_t * sock_inode_cachep;static struct inode *sock_alloc_inode (struct super_block *sb) {struct socket_alloc *ei; - ei = (struct socket_alloc *)kmem_cache_alloc (sock_inode_cachep,SLAB_KERNEL ); + ei = (struct socket_alloc *)kmem_cache_alloc (sock_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;init_waitqueue_head (&ei->socket.wait);
net/sunrpc/rpc_pipe.c +1 -1
@@ -108,7 +108,7 @@ static struct inode * rpc_alloc_inode(struct super_block *sb) {struct rpc_inode *rpci; - rpci = (struct rpc_inode *)kmem_cache_alloc (rpc_inode_cachep,SLAB_KERNEL ); + rpci = (struct rpc_inode *)kmem_cache_alloc (rpc_inode_cachep,GFP_KERNEL );if (!rpci)return NULL ;return &rpci->vfs_inode;
Quoted 2 lines · William Lee Irwin III
Quoted 2 lines
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.
Quoted 2 lines · Christoph Hellwig
Why? I'd prefer to completly get rid of the
SLAB_flags instead. (stupid slowaris compat..)
Looks like I missed one. They're all dead now.
Kill SLAB_DMA, SLAB_NOIO, SLAB_NOFS, SLAB_KERNEL, and SLAB_USER.
Documentation/DMA-mapping.txt | 4 +- Documentation/filesystems/devfs/ChangeLog | 1 Documentation/usb/URB.txt | 2 - arch/arm/common/sa1111-pcipool.c | 6 ++-- arch/i386/mm/pgtable.c | 4 +- arch/ia64/ia32/binfmt_elf32.c | 6 ++-- arch/ia64/kernel/perfmon.c | 2 - arch/ia64/mm/init.c | 4 +- arch/s390x/kernel/exec32.c | 2 - arch/x86_64/ia32/ia32_binfmt.c | 2 - drivers/block/DAC960.c | 4 +- drivers/block/ll_rw_blk.c | 2 - drivers/ieee1394/amdtp.c | 16 +++++----- drivers/ieee1394/cmp.c | 2 - drivers/ieee1394/eth1394.c | 2 - drivers/ieee1394/hosts.c | 2 - drivers/ieee1394/iso.c | 2 - drivers/ieee1394/nodemgr.c | 2 - drivers/ieee1394/ohci1394.c | 12 ++++---- drivers/ieee1394/pcilynx.c | 2 - drivers/ieee1394/raw1394.c | 44 +++++++++++++++--------------- drivers/ieee1394/sbp2.c | 2 - drivers/pci/pool.c | 8 ++--- drivers/usb/core/buffer.c | 2 - drivers/usb/core/hub.c | 2 - drivers/usb/core/message.c | 2 - drivers/usb/host/ehci-dbg.c | 2 - drivers/usb/host/ehci-hcd.c | 2 - drivers/usb/host/ehci-q.c | 2 - drivers/usb/host/ohci-dbg.c | 2 - drivers/usb/host/ohci-q.c | 4 +- drivers/usb/host/uhci-hcd.c | 2 - drivers/usb/input/aiptek.c | 2 - drivers/usb/input/hid-core.c | 10 +++--- drivers/usb/input/powermate.c | 4 +- drivers/usb/input/usbkbd.c | 8 ++--- drivers/usb/input/usbmouse.c | 4 +- drivers/usb/input/wacom.c | 2 - drivers/usb/input/xpad.c | 2 - drivers/usb/misc/usbtest.c | 28 +++++++++---------- drivers/usb/net/catc.c | 2 - drivers/usb/net/kaweth.c | 2 - drivers/usb/net/pegasus.c | 2 - drivers/usb/net/rtl8150.c | 2 - drivers/usb/storage/transport.c | 2 - fs/adfs/super.c | 2 - fs/affs/super.c | 2 - fs/afs/super.c | 2 - fs/befs/linuxvfs.c | 2 - fs/bfs/inode.c | 2 - fs/block_dev.c | 2 - fs/char_dev.c | 2 - fs/cifs/cifsfs.c | 2 - fs/cifs/misc.c | 2 - fs/cifs/transport.c | 2 - fs/coda/inode.c | 2 - fs/devfs/base.c | 4 +- fs/dnotify.c | 2 - fs/dquot.c | 2 - fs/efs/super.c | 2 - fs/eventpoll.c | 4 +- fs/exec.c | 2 - fs/ext2/super.c | 2 - fs/ext3/super.c | 2 - fs/fat/inode.c | 2 - fs/fcntl.c | 2 - fs/file_table.c | 2 - fs/freevxfs/vxfs_fshead.c | 2 - fs/freevxfs/vxfs_inode.c | 4 +- fs/hfs/super.c | 2 - fs/hpfs/super.c | 2 - fs/inode.c | 2 - fs/intermezzo/dcache.c | 2 - fs/isofs/inode.c | 2 - fs/jffs/jffs_fm.c | 4 +- fs/jffs2/super.c | 2 - fs/locks.c | 2 - fs/minix/inode.c | 2 - fs/ncpfs/inode.c | 2 - fs/nfs/inode.c | 2 - fs/nfs/pagelist.c | 2 - fs/nfs/read.c | 2 - fs/nfs/write.c | 4 +- fs/ntfs/attrib.c | 2 - fs/ntfs/inode.c | 4 +- fs/ntfs/unistr.c | 2 - fs/proc/inode.c | 2 - fs/qnx4/inode.c | 2 - fs/reiserfs/super.c | 2 - fs/romfs/inode.c | 2 - fs/smbfs/inode.c | 2 - fs/smbfs/request.c | 2 - fs/sysv/inode.c | 2 - fs/udf/super.c | 2 - fs/ufs/super.c | 2 - include/linux/fs.h | 2 - include/linux/slab.h | 8 ----- include/net/tcp.h | 2 - kernel/fork.c | 6 ++-- kernel/user.c | 2 - mm/mmap.c | 6 ++-- mm/mremap.c | 2 - mm/shmem.c | 2 - mm/slab.c | 6 ++-- net/core/dst.c | 2 - net/core/neighbour.c | 2 - net/decnet/dn_table.c | 2 - net/ipv4/fib_hash.c | 2 - net/ipv4/tcp_ipv4.c | 2 - net/ipv4/tcp_minisocks.c | 2 - net/ipv4/xfrm_input.c | 2 - net/ipv4/xfrm_policy.c | 2 - net/ipv6/ip6_fib.c | 2 - net/socket.c | 2 - net/sunrpc/rpc_pipe.c | 2 - 115 files changed, 193 insertions(+), 200 deletions(-)
Documentation/DMA-mapping.txt +2 -2
@@ -341,8 +341,8 @@ Allocate memory from a pci pool like thi cpu_addr = pci_pool_alloc(pool, flags, &dma_handle); -flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor -holding SMP locks), SLAB_ATOMIC otherwise. Like pci_alloc_consistent, +flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor +holding SMP locks), GFP_ATOMIC otherwise. Like pci_alloc_consistent, this returns two values, cpu_addr and dma_handle. Free memory that was allocated from a pci_pool like this:
Documentation/filesystems/devfs/ChangeLog +1 -1
@@ -1822,7 +1822,7 @@ Changes for patch v202 =============================================================================== Changes for patch v203 -- Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> +- Use GFP_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> =============================================================================== Changes for patch v204
Documentation/usb/URB.txt +1 -1
@@ -121,7 +121,7 @@ Just call int usb_submit_urb(struct urb *urb, int mem_flags) -The mem_flags parameter, such as SLAB_ATOMIC, controls memory allocation, +The mem_flags parameter, such as GFP_ATOMIC, controls memory allocation, such as whether the lower levels may block when memory is tight. It immediately returns, either with status 0 (request queued) or some
arch/arm/common/sa1111-pcipool.c +3 -3
@@ -110,7 +110,7 @@ pci_pool_create (const char *name, struc }else if (allocation < size)return 0 ; -if (!(retval =kmalloc (sizeof *retval,SLAB_KERNEL ))) +if (!(retval =kmalloc (sizeof *retval,GFP_KERNEL )))return retval;strncpy (retval->name, name,sizeof retval->name);
@@ -228,7 +228,7 @@ pci_pool_destroy (struct pci_pool *pool)/** * pci_pool_alloc - get a block of consistent memory * @pool: pci pool that will produce the block -* @mem_flags: SLAB_KERNEL or SLAB_ATOMIC +* @mem_flags: GFP_KERNEL or GFP_ATOMIC * @handle: pointer to dma address of block * * This returns the kernel virtual address of a currently unused block,
@@ -266,7 +266,7 @@ restart: } }if (!(page =pool_alloc_page (pool, mem_flags))) { -if (mem_flags ==SLAB_KERNEL ) { +if (mem_flags ==GFP_KERNEL ) {DECLARE_WAITQUEUE (wait, current); current->state =TASK_INTERRUPTIBLE ;
arch/i386/mm/pgtable.c +2 -2
@@ -188,7 +188,7 @@ void pgd_ctor(void *__pgd, kmem_cache_tpgd_t *pgd_alloc (struct mm_struct *mm) {int i; -pgd_t *pgd =kmem_cache_alloc (pgd_cache,SLAB_KERNEL ); +pgd_t *pgd =kmem_cache_alloc (pgd_cache,GFP_KERNEL );if (PTRS_PER_PMD ==1 )return pgd;
@@ -196,7 +196,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)return NULL ;for (i =0 ; i <USER_PTRS_PER_PGD ; ++i) { -pmd_t *pmd =kmem_cache_alloc (pmd_cache,SLAB_KERNEL ); +pmd_t *pmd =kmem_cache_alloc (pmd_cache,GFP_KERNEL );if (!pmd) goto out_oom;set_pgd (pgd + i,__pgd (1 +__pa ((unsigned long long )((unsigned long )pmd))));
arch/ia64/ia32/binfmt_elf32.c +3 -3
@@ -79,7 +79,7 @@ ia64_elf32_init (struct pt_regs *regs)* it with privilege level 3 because the IVE uses non-privileged accesses to these * tables. IA-32 segmentation is used to protect against IA-32 accesses to them. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA32_GDT_OFFSET ;
@@ -101,7 +101,7 @@ ia64_elf32_init (struct pt_regs *regs)* Install LDT as anonymous memory. This gives us all-zero segment descriptors * until a task modifies them via modify_ldt(). */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA32_LDT_OFFSET ;
@@ -172,7 +172,7 @@ ia32_setup_arg_pages (struct linux_binpr bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
arch/ia64/kernel/perfmon.c +1 -1
@@ -796,7 +796,7 @@ pfm_smpl_buffer_alloc(pfm_context_t *ctx }/* allocate vma */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!vma) {DBprintk (("Cannot allocate vma\n" )); goto error_kmem;
arch/ia64/mm/init.c +2 -2
@@ -74,7 +74,7 @@ ia64_init_addr_space (void)* the problem. When the process attempts to write to the register backing store * for the first time, it will get a SEGFAULT in this case. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) { vma->vm_mm = current->mm; vma->vm_start =IA64_RBS_BOT ;
@@ -90,7 +90,7 @@ ia64_init_addr_space (void)/* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ if (!(current->personality &MMAP_PAGE_ZERO )) { - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (vma) {memset (vma,0 ,sizeof (*vma)); vma->vm_mm = current->mm;
arch/s390x/kernel/exec32.c +1 -1
@@ -51,7 +51,7 @@ int setup_arg_pages32(struct linux_binpr bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
arch/x86_64/ia32/ia32_binfmt.c +1 -1
@@ -290,7 +290,7 @@ int setup_arg_pages(struct linux_binprm bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
drivers/block/DAC960.c +2 -2
@@ -251,13 +251,13 @@ static boolean DAC960_CreateAuxiliaryStr Command->Next = Controller->FreeCommands; Controller->FreeCommands = Command; Controller->Commands[CommandIdentifier-1 ] = Command; - ScatterGatherCPU =pci_pool_alloc (ScatterGatherPool,SLAB_ATOMIC , + ScatterGatherCPU =pci_pool_alloc (ScatterGatherPool,GFP_ATOMIC , &ScatterGatherDMA);if (ScatterGatherCPU ==NULL )return DAC960_Failure (Controller,"AUXILIARY STRUCTURE CREATION" );if (RequestSensePool !=NULL ) { - RequestSenseCPU =pci_pool_alloc (RequestSensePool,SLAB_ATOMIC , + RequestSenseCPU =pci_pool_alloc (RequestSensePool,GFP_ATOMIC , &RequestSenseDMA);if (RequestSenseCPU ==NULL ) { pci_pool_free(ScatterGatherPool, ScatterGatherCPU,
drivers/block/ll_rw_blk.c +1 -1
@@ -1222,7 +1222,7 @@ static int blk_init_free_list(request_qu*/ rl = &q->rq[READ ];for (i =0 ; i < (queue_nr_requests*2 ); i++) { - rq =kmem_cache_alloc (request_cachep,SLAB_KERNEL ); + rq =kmem_cache_alloc (request_cachep,GFP_KERNEL );if (!rq) goto nomem;
drivers/ieee1394/amdtp.c +8 -8
@@ -558,15 +558,15 @@ struct packet_list *packet_list_alloc(ststruct packet_list *pl;struct packet *next; - pl =kmalloc (sizeof *pl,SLAB_KERNEL ); + pl =kmalloc (sizeof *pl,GFP_KERNEL );if (pl ==NULL )return NULL ;for (i =0 ; i <PACKET_LIST_SIZE ; i++) {struct packet *p = &pl->packets[i]; - p->db =pci_pool_alloc (s->descriptor_pool,SLAB_KERNEL , + p->db =pci_pool_alloc (s->descriptor_pool,GFP_KERNEL , &p->db_bus); - p->payload =pci_pool_alloc (s->packet_pool,SLAB_KERNEL , + p->payload =pci_pool_alloc (s->packet_pool,GFP_KERNEL , &p->payload_bus); }
@@ -597,7 +597,7 @@ static struct buffer *buffer_alloc(int s {struct buffer *b; - b =kmalloc (sizeof *b + size,SLAB_KERNEL ); + b =kmalloc (sizeof *b + size,GFP_KERNEL ); b->head =0 ; b->tail =0 ; b->length =0 ;
@@ -834,7 +834,7 @@ static int stream_alloc_packet_lists(str max_packet_size = max_nevents * s->dimension *4 +8 ; s->packet_pool =hpsb_pci_pool_create ("packet pool" , s->host->ohci->dev, - max_packet_size,0 ,0 ,SLAB_KERNEL ); + max_packet_size,0 ,0 ,GFP_KERNEL );if (s->packet_pool ==NULL )return -1 ;
@@ -1006,7 +1006,7 @@ struct stream *stream_alloc(struct amdtpstruct stream *s;unsigned long flags; - s =kmalloc (sizeof (struct stream ),SLAB_KERNEL ); + s =kmalloc (sizeof (struct stream ),GFP_KERNEL );if (s ==NULL )return NULL ;
@@ -1021,7 +1021,7 @@ struct stream *stream_alloc(struct amdtp s->descriptor_pool =hpsb_pci_pool_create ("descriptor pool" , host->ohci->dev,sizeof (struct descriptor_block ), -16 ,0 ,SLAB_KERNEL ); +16 ,0 ,GFP_KERNEL );if (s->descriptor_pool ==NULL ) {kfree (s->input);
@@ -1212,7 +1212,7 @@ static void amdtp_add_host(struct hpsb_hif (strcmp (host->driver->name,OHCI1394_DRIVER_NAME ) !=0 )return ; - ah =kmalloc (sizeof *ah,in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + ah =kmalloc (sizeof *ah,in_interrupt () ?GFP_ATOMIC :GFP_KERNEL ); ah->host = host; ah->ohci = host->hostdata;INIT_LIST_HEAD (&ah->stream_list);
drivers/ieee1394/cmp.c +1 -1
@@ -159,7 +159,7 @@ static void cmp_add_host(struct hpsb_hos {struct cmp_host *ch; - ch =kmalloc (sizeof *ch,in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + ch =kmalloc (sizeof *ch,in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (ch ==NULL ) {HPSB_ERR ("Failed to allocate cmp_host" );return ;
drivers/ieee1394/eth1394.c +1 -1
@@ -360,7 +360,7 @@ static void ether1394_add_host (struct h priv->host = host; hi = (struct host_info *)kmalloc (sizeof (struct host_info ), -in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); +in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (hi ==NULL ) goto out;
drivers/ieee1394/hosts.c +1 -1
@@ -123,7 +123,7 @@ struct hpsb_host *hpsb_alloc_host(structstruct hpsb_host *h;int i; - h =kmalloc (sizeof (struct hpsb_host ) + extra,SLAB_KERNEL ); + h =kmalloc (sizeof (struct hpsb_host ) + extra,GFP_KERNEL );if (!h)return NULL ;memset (h,0 ,sizeof (struct hpsb_host ) + extra);
drivers/ieee1394/iso.c +1 -1
@@ -80,7 +80,7 @@ static struct hpsb_iso* hpsb_iso_common_/* allocate and write the struct hpsb_iso */ - iso =kmalloc (sizeof (*iso),SLAB_KERNEL ); + iso =kmalloc (sizeof (*iso),GFP_KERNEL );if (!iso)return NULL ;
drivers/ieee1394/nodemgr.c +1 -1
@@ -1325,7 +1325,7 @@ static void nodemgr_add_host(struct hpsbstruct host_info *hi;unsigned long flags; - hi =kmalloc (sizeof (struct host_info ),in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); + hi =kmalloc (sizeof (struct host_info ),in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (!hi) {HPSB_ERR ("NodeMgr: out of memory in add host" );
drivers/ieee1394/ohci1394.c +6 -6
@@ -1056,7 +1056,7 @@ static int ohci_iso_recv_init(struct hpsint ctx;int ret = -ENOMEM ; - recv =kmalloc (sizeof (*recv),SLAB_KERNEL ); + recv =kmalloc (sizeof (*recv),GFP_KERNEL );if (!recv)return -ENOMEM ;
@@ -1416,7 +1416,7 @@ static int ohci_iso_xmit_init(struct hpsint ctx;int ret = -ENOMEM ; - xmit =kmalloc (sizeof (*xmit),SLAB_KERNEL ); + xmit =kmalloc (sizeof (*xmit),GFP_KERNEL );if (!xmit)return -ENOMEM ;
@@ -2394,7 +2394,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci, } d->prg_pool =hpsb_pci_pool_create ("ohci1394 rcv prg" , ohci->dev, -sizeof (struct dma_cmd ),4 ,0 ,SLAB_KERNEL ); +sizeof (struct dma_cmd ),4 ,0 ,GFP_KERNEL );OHCI_DMA_ALLOC ("dma_rcv prg pool" );for (i=0 ; i<d->num_desc; i++) {
@@ -2412,7 +2412,7 @@ alloc_dma_rcv_ctx(struct ti_ohci *ohci,return -ENOMEM ; } - d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,SLAB_KERNEL , d->prg_bus+i); + d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,GFP_KERNEL , d->prg_bus+i);OHCI_DMA_ALLOC ("pool dma_rcv prg[%d]" , i);if (d->prg_cpu[i] !=NULL ) {
@@ -2503,11 +2503,11 @@ alloc_dma_trm_ctx(struct ti_ohci *ohci,memset (d->prg_bus,0 , d->num_desc *sizeof (dma_addr_t)); d->prg_pool =hpsb_pci_pool_create ("ohci1394 trm prg" , ohci->dev, -sizeof (struct at_dma_prg ),4 ,0 ,SLAB_KERNEL ); +sizeof (struct at_dma_prg ),4 ,0 ,GFP_KERNEL );OHCI_DMA_ALLOC ("dma_rcv prg pool" );for (i =0 ; i < d->num_desc; i++) { - d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,SLAB_KERNEL , d->prg_bus+i); + d->prg_cpu[i] =pci_pool_alloc (d->prg_pool,GFP_KERNEL , d->prg_bus+i);OHCI_DMA_ALLOC ("pool dma_trm prg[%d]" , i);if (d->prg_cpu[i] !=NULL ) {
drivers/ieee1394/pcilynx.c +1 -1
@@ -865,7 +865,7 @@ static int mem_open(struct inode *inode, type = t_ram; } - md = (struct memdata *)kmalloc (sizeof (struct memdata ),SLAB_KERNEL ); + md = (struct memdata *)kmalloc (sizeof (struct memdata ),GFP_KERNEL );if (md ==NULL )return -ENOMEM ;
drivers/ieee1394/raw1394.c +22 -22
171 lines not on this page · raw message
drivers/ieee1394/sbp2.c +1 -1
@@ -1011,7 +1011,7 @@ static void sbp2_add_host(struct hpsb_ho/* Allocate some memory for our host info structure */ hi = (struct sbp2scsi_host_info *)kmalloc (sizeof (struct sbp2scsi_host_info ), -in_interrupt () ?SLAB_ATOMIC :SLAB_KERNEL ); +in_interrupt () ?GFP_ATOMIC :GFP_KERNEL );if (hi ==NULL ) {SBP2_ERR ("out of memory in sbp2_add_host" );
drivers/pci/pool.c +4 -4
@@ -125,7 +125,7 @@ pci_pool_create (const char *name, struc }else if (allocation < size)return 0 ; -if (!(retval =kmalloc (sizeof *retval,SLAB_KERNEL ))) +if (!(retval =kmalloc (sizeof *retval,GFP_KERNEL )))return retval;strncpy (retval->name, name,sizeof retval->name);
@@ -249,7 +249,7 @@ pci_pool_destroy (struct pci_pool *pool)/** * pci_pool_alloc - get a block of consistent memory * @pool: pci pool that will produce the block -* @mem_flags: SLAB_KERNEL or SLAB_ATOMIC +* @mem_flags: GFP_KERNEL or GFP_ATOMIC * @handle: pointer to dma address of block * * This returns the kernel virtual address of a currently unused block,
@@ -286,8 +286,8 @@ restart: } } } -if (!(page =pool_alloc_page (pool,SLAB_ATOMIC ))) { -if (mem_flags ==SLAB_KERNEL ) { +if (!(page =pool_alloc_page (pool,GFP_ATOMIC ))) { +if (mem_flags ==GFP_KERNEL ) {DECLARE_WAITQUEUE (wait, current); current->state =TASK_INTERRUPTIBLE ;
drivers/usb/core/buffer.c +1 -1
@@ -97,7 +97,7 @@ void hcd_buffer_destroy (struct usb_hcdEXPORT_SYMBOL (hcd_buffer_destroy); -/* sometimes alloc/free could use kmalloc with SLAB_DMA, for +/* sometimes alloc/free could use kmalloc with GFP_DMA, for * better sharing and to leverage mm/slab.c intelligence. */
drivers/usb/core/hub.c +1 -1
@@ -233,7 +233,7 @@ void usb_hub_tt_clear_buffer (struct usb* since each TT has "at least two" buffers that can need it (and * there can be many TTs per hub). even if they're uncommon. */ -if ((clear =kmalloc (sizeof *clear,SLAB_ATOMIC )) ==0 ) { +if ((clear =kmalloc (sizeof *clear,GFP_ATOMIC )) ==0 ) {err ("can't save CLEAR_TT_BUFFER state for hub at usb-%s-%s" , dev->bus->bus_name, tt->hub->devpath);/* FIXME recover somehow ... RESET_TT? */
drivers/usb/core/message.c +1 -1
@@ -439,7 +439,7 @@ void usb_sg_wait (struct usb_sg_requestfor (i =0 ; i < io->entries && !io->status; i++) {int retval; - retval =usb_submit_urb (io->urbs [i],SLAB_ATOMIC ); + retval =usb_submit_urb (io->urbs [i],GFP_ATOMIC );/* after we submit, let completions or cancelations fire; * we handshake using io->status.
drivers/usb/host/ehci-dbg.c +1 -1
@@ -429,7 +429,7 @@ show_periodic (struct device *dev, charchar *next;unsigned i, tag; -if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,SLAB_ATOMIC ))) +if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,GFP_ATOMIC )))return 0 ; seen_count =0 ;
drivers/usb/host/ehci-hcd.c +1 -1
@@ -361,7 +361,7 @@ static int ehci_start (struct usb_hcd *h* periodic_size can shrink by USBCMD update if hcc_params allows. */ ehci->periodic_size =DEFAULT_I_TDPS ; -if ((retval =ehci_mem_init (ehci,SLAB_KERNEL )) <0 ) +if ((retval =ehci_mem_init (ehci,GFP_KERNEL )) <0 )return retval;/* controllers may cache some of the periodic schedule ... */
drivers/usb/host/ehci-q.c +1 -1
@@ -756,7 +756,7 @@ static struct ehci_qh *qh_append_tds ( qh = (struct ehci_qh *) *ptr;if (unlikely (qh ==0 )) {/* can't sleep here, we have ehci->lock... */ - qh =qh_make (ehci, urb,SLAB_ATOMIC ); + qh =qh_make (ehci, urb,GFP_ATOMIC ); *ptr = qh; }if (likely (qh !=0 )) {
drivers/usb/host/ohci-dbg.c +1 -1
@@ -427,7 +427,7 @@ show_periodic (struct device *dev, charchar *next;unsigned i; -if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,SLAB_ATOMIC ))) +if (!(seen =kmalloc (DBG_SCHED_LIMIT *sizeof *seen,GFP_ATOMIC )))return 0 ; seen_count =0 ;
drivers/usb/host/ohci-q.c +2 -2
@@ -362,7 +362,7 @@ static struct ed *ed_get (if (!(ed = dev->ep [ep])) {struct td *td; - ed =ed_alloc (ohci,SLAB_ATOMIC ); + ed =ed_alloc (ohci,GFP_ATOMIC );if (!ed) {/* out of memory */ goto done;
@@ -370,7 +370,7 @@ static struct ed *ed_get ( dev->ep [ep] = ed;/* dummy td; end of td list for ed */ - td =td_alloc (ohci,SLAB_ATOMIC ); + td =td_alloc (ohci,GFP_ATOMIC );if (!td) {/* out of memory */ ed_free (ohci, ed);
drivers/usb/host/uhci-hcd.c +1 -1
@@ -647,7 +647,7 @@ static struct urb_priv *uhci_alloc_urb_p {struct urb_priv *urbp; - urbp =kmem_cache_alloc (uhci_up_cachep,SLAB_ATOMIC ); + urbp =kmem_cache_alloc (uhci_up_cachep,GFP_ATOMIC );if (!urbp) {err ("uhci_alloc_urb_priv: couldn't allocate memory for urb_priv\n" );return NULL ;
drivers/usb/input/aiptek.c +1 -1
@@ -263,7 +263,7 @@ aiptek_probe(struct usb_interface *intf,memset (aiptek,0 ,sizeof (struct aiptek )); - aiptek->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &aiptek->data_dma); + aiptek->data =usb_buffer_alloc (dev,10 ,GFP_ATOMIC , &aiptek->data_dma);if (!aiptek->data) {kfree (aiptek);return -ENOMEM ;
drivers/usb/input/hid-core.c +5 -5
@@ -915,7 +915,7 @@ static void hid_irq_in(struct urb *urb,dbg ("nonzero status in input irq %d" , urb->status); } - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input%d, status %d", hid->dev->bus->bus_name, hid->dev->devpath,
@@ -1377,13 +1377,13 @@ struct hid_blacklist {static int hid_alloc_buffers (struct usb_device *dev,struct hid_device *hid) { -if (!(hid->inbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->inbuf_dma))) +if (!(hid->inbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->inbuf_dma)))return -1 ; -if (!(hid->outbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->outbuf_dma))) +if (!(hid->outbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->outbuf_dma)))return -1 ; -if (!(hid->cr =usb_buffer_alloc (dev,sizeof (*(hid->cr)),SLAB_ATOMIC , &hid->cr_dma))) +if (!(hid->cr =usb_buffer_alloc (dev,sizeof (*(hid->cr)),GFP_ATOMIC , &hid->cr_dma)))return -1 ; -if (!(hid->ctrlbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,SLAB_ATOMIC , &hid->ctrlbuf_dma))) +if (!(hid->ctrlbuf =usb_buffer_alloc (dev,HID_BUFFER_SIZE ,GFP_ATOMIC , &hid->ctrlbuf_dma)))return -1 ;return 0 ;
drivers/usb/input/powermate.c +2 -2
@@ -270,11 +270,11 @@ static int powermate_input_event(structstatic int powermate_alloc_buffers (struct usb_device *udev,struct powermate_device *pm) { pm->data =usb_buffer_alloc (udev,POWERMATE_PAYLOAD_SIZE , -SLAB_ATOMIC , &pm->data_dma); +GFP_ATOMIC , &pm->data_dma);if (!pm->data)return -1 ; pm->configcr =usb_buffer_alloc (udev,sizeof (*(pm->configcr)), -SLAB_ATOMIC , &pm->configcr_dma); +GFP_ATOMIC , &pm->configcr_dma);if (!pm->configcr)return -1 ;
drivers/usb/input/usbkbd.c +4 -4
@@ -126,7 +126,7 @@ static void usb_kbd_irq(struct urb *urb,memcpy (kbd->old, kbd->new,8 ); resubmit: - i =usb_submit_urb (urb,SLAB_ATOMIC ); + i =usb_submit_urb (urb,GFP_ATOMIC );if (i) err ("can't resubmit intr, %s-%s/input0, status %d", kbd->usbdev->bus->bus_name,
@@ -204,11 +204,11 @@ static int usb_kbd_alloc_mem(struct usb_return -1 ;if (!(kbd->led =usb_alloc_urb (0 ,GFP_KERNEL )))return -1 ; -if (!(kbd->new =usb_buffer_alloc (dev,8 ,SLAB_ATOMIC , &kbd->new_dma))) +if (!(kbd->new =usb_buffer_alloc (dev,8 ,GFP_ATOMIC , &kbd->new_dma)))return -1 ; -if (!(kbd->cr =usb_buffer_alloc (dev,sizeof (struct usb_ctrlrequest ),SLAB_ATOMIC , &kbd->cr_dma))) +if (!(kbd->cr =usb_buffer_alloc (dev,sizeof (struct usb_ctrlrequest ),GFP_ATOMIC , &kbd->cr_dma)))return -1 ; -if (!(kbd->leds =usb_buffer_alloc (dev,1 ,SLAB_ATOMIC , &kbd->leds_dma))) +if (!(kbd->leds =usb_buffer_alloc (dev,1 ,GFP_ATOMIC , &kbd->leds_dma)))return -1 ;return 0 ;
drivers/usb/input/usbmouse.c +2 -2
@@ -90,7 +90,7 @@ static void usb_mouse_irq(struct urb *urinput_sync (dev); resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input0, status %d", mouse->usbdev->bus->bus_name,
@@ -149,7 +149,7 @@ static int usb_mouse_probe(struct usb_inreturn -ENOMEM ;memset (mouse,0 ,sizeof (struct usb_mouse )); - mouse->data =usb_buffer_alloc (dev,8 ,SLAB_ATOMIC , &mouse->data_dma); + mouse->data =usb_buffer_alloc (dev,8 ,GFP_ATOMIC , &mouse->data_dma);if (!mouse->data) {kfree (mouse);return -ENOMEM ;
drivers/usb/input/wacom.c +1 -1
@@ -507,7 +507,7 @@ static int wacom_probe(struct usb_interfreturn -ENOMEM ;memset (wacom,0 ,sizeof (struct wacom )); - wacom->data =usb_buffer_alloc (dev,10 ,SLAB_ATOMIC , &wacom->data_dma); + wacom->data =usb_buffer_alloc (dev,10 ,GFP_ATOMIC , &wacom->data_dma);if (!wacom->data) {kfree (wacom);return -ENOMEM ;
drivers/usb/input/xpad.c +1 -1
@@ -239,7 +239,7 @@ static int xpad_probe(struct usb_interfamemset (xpad,0 ,sizeof (struct usb_xpad )); xpad->idata =usb_buffer_alloc (udev,XPAD_PKT_LEN , -SLAB_ATOMIC , &xpad->idata_dma); +GFP_ATOMIC , &xpad->idata_dma);if (!xpad->idata) {kfree (xpad);return -ENOMEM ;
drivers/usb/misc/usbtest.c +14 -14
@@ -100,7 +100,7 @@ static struct urb *simple_alloc_urb (if (bytes <0 )return 0 ; - urb =usb_alloc_urb (0 ,SLAB_KERNEL ); + urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!urb)return urb;usb_fill_bulk_urb (urb, udev, pipe,0 , bytes, simple_callback,0 );
@@ -110,7 +110,7 @@ static struct urb *simple_alloc_urb ( urb->transfer_flags =URB_NO_DMA_MAP ;if (usb_pipein (pipe)) urb->transfer_flags |=URB_SHORT_NOT_OK ; - urb->transfer_buffer =usb_buffer_alloc (udev, bytes,SLAB_KERNEL , + urb->transfer_buffer =usb_buffer_alloc (udev, bytes,GFP_KERNEL , &urb->transfer_dma);if (!urb->transfer_buffer) {usb_free_urb (urb);
@@ -141,7 +141,7 @@ static int simple_io ( urb->context = &completion;while (retval ==0 && iterations-- >0 ) {init_completion (&completion); -if ((retval =usb_submit_urb (urb,SLAB_KERNEL )) !=0 ) +if ((retval =usb_submit_urb (urb,GFP_KERNEL )) !=0 )break ;/* NOTE: no timeouts; can't be broken out of by interrupt */
@@ -198,7 +198,7 @@ alloc_sglist (int nents, int max, int vaunsigned i;unsigned size = max; - sg =kmalloc (nents *sizeof *sg,SLAB_KERNEL ); + sg =kmalloc (nents *sizeof *sg,GFP_KERNEL );if (!sg)return 0 ;memset (sg,0 , nents *sizeof *sg);
@@ -206,7 +206,7 @@ alloc_sglist (int nents, int max, int vafor (i =0 ; i < nents; i++) {char *buf; - buf =kmalloc (size,SLAB_KERNEL ); + buf =kmalloc (size,GFP_KERNEL );if (!buf) {free_sglist (sg, i);return 0 ;
@@ -245,7 +245,7 @@ static int perform_sglist ( (udev->speed ==USB_SPEED_HIGH ) ? (INTERRUPT_RATE <<3 ) :INTERRUPT_RATE , - sg, nents, 0, SLAB_KERNEL); + sg, nents, 0, GFP_KERNEL);if (retval)break ;
@@ -658,7 +658,7 @@ error:/* resubmit if we need to, else mark this as done */ if ((status ==0 ) && (ctx->pending < ctx->count)) { -if ((status =usb_submit_urb (urb,SLAB_ATOMIC )) !=0 ) { +if ((status =usb_submit_urb (urb,GFP_ATOMIC )) !=0 ) {dbg ("can't resubmit ctrl %02x.%02x, err %d" , reqp->bRequestType, reqp->bRequest, status); urb->dev =0 ;
@@ -693,7 +693,7 @@ test_ctrl_queue (struct usbtest_dev *dev* as with bulk/intr sglists, sglen is the queue depth; it also * controls which subtests run (more tests than sglen) or rerun. */ - urb =kmalloc (param->sglen *sizeof (struct urb *),SLAB_KERNEL ); + urb =kmalloc (param->sglen *sizeof (struct urb *),GFP_KERNEL );if (!urb) goto cleanup;memset (urb,0 , param->sglen *sizeof (struct urb *));
@@ -793,7 +793,7 @@ test_ctrl_queue (struct usbtest_dev *devif (!u) goto cleanup; - reqp =usb_buffer_alloc (udev,sizeof req,SLAB_KERNEL , + reqp =usb_buffer_alloc (udev,sizeof req,GFP_KERNEL , &u->setup_dma);if (!reqp) goto cleanup;
@@ -809,7 +809,7 @@ test_ctrl_queue (struct usbtest_dev *dev context.urb = urb;spin_lock_irq (&context.lock);for (i =0 ; i < param->sglen; i++) { - context.status =usb_submit_urb (urb [i],SLAB_ATOMIC ); + context.status =usb_submit_urb (urb [i],GFP_ATOMIC );if (context.status !=0 ) {dbg ("can't submit urb[%d], status %d" , i, context.status);
@@ -849,7 +849,7 @@ static void unlink1_callback (struct urb// we "know" -EPIPE (stall) never happens if (!status) - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) {if (status == -ECONNRESET || status == -ENOENT ) status =0 ;
@@ -877,7 +877,7 @@ static int unlink1 (struct usbtest_dev ** FIXME want additional tests for when endpoint is STALLing * due to errors, or is just NAKing requests. */ -if ((retval =usb_submit_urb (urb,SLAB_KERNEL )) !=0 ) { +if ((retval =usb_submit_urb (urb,GFP_KERNEL )) !=0 ) {dbg ("submit/unlink fail %d" , retval);return retval; }
@@ -1214,7 +1214,7 @@ usbtest_probe (struct usb_interface *int }#endif - dev =kmalloc (sizeof *dev,SLAB_KERNEL ); + dev =kmalloc (sizeof *dev,GFP_KERNEL );if (!dev)return -ENOMEM ;memset (dev,0 ,sizeof *dev);
@@ -1229,7 +1229,7 @@ usbtest_probe (struct usb_interface *int dev->intf = intf;/* cacheline-aligned scratch for i/o */ -if ((dev->buf =kmalloc (TBUF_SIZE ,SLAB_KERNEL )) ==0 ) { +if ((dev->buf =kmalloc (TBUF_SIZE ,GFP_KERNEL )) ==0 ) {kfree (dev);return -ENOMEM ; }
drivers/usb/net/catc.c +1 -1
@@ -343,7 +343,7 @@ static void catc_irq_done(struct urb *ur } } resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s, status %d", catc->usbdev->bus->bus_name,
drivers/usb/net/kaweth.c +1 -1
@@ -499,7 +499,7 @@ static void int_callback(struct urb *u, kaweth->linkstate = act_state; } resubmit: - status =usb_submit_urb (u,SLAB_ATOMIC ); + status =usb_submit_urb (u,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s, status %d", kaweth->dev->bus->bus_name,
drivers/usb/net/pegasus.c +1 -1
@@ -719,7 +719,7 @@ static void intr_callback(struct urb *ur } } - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status)err ("%s: can't resubmit interrupt urb, %d" , net->name, status); }
drivers/usb/net/rtl8150.c +1 -1
@@ -475,7 +475,7 @@ void intr_callback(struct urb *urb, stru/* FIXME if this doesn't do anything, don't submit the urb! */ resubmit: - status =usb_submit_urb (urb,SLAB_ATOMIC ); + status =usb_submit_urb (urb,GFP_ATOMIC );if (status) err ("can't resubmit intr, %s-%s/input0, status %d", dev->udev->bus->bus_name,
drivers/usb/storage/transport.c +1 -1
@@ -421,7 +421,7 @@ int usb_stor_bulk_transfer_sglist(structUS_DEBUGP ("usb_stor_bulk_transfer_sglist(): xfer %u bytes, " "%d entries\n" , length, num_sg); result =usb_sg_init (us->current_sg, us->pusb_dev, pipe,0 , - sg, num_sg, length,SLAB_NOIO ); + sg, num_sg, length,GFP_NOIO );if (result) {US_DEBUGP ("usb_sg_init returned %d\n" , result);return USB_STOR_XFER_ERROR ;
fs/adfs/super.c +1 -1
@@ -210,7 +210,7 @@ static kmem_cache_t *adfs_inode_cachep;static struct inode *adfs_alloc_inode (struct super_block *sb) {struct adfs_inode_info *ei; - ei = (struct adfs_inode_info *)kmem_cache_alloc (adfs_inode_cachep,SLAB_KERNEL ); + ei = (struct adfs_inode_info *)kmem_cache_alloc (adfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/affs/super.c +1 -1
@@ -89,7 +89,7 @@ static kmem_cache_t * affs_inode_cachep;static struct inode *affs_alloc_inode (struct super_block *sb) {struct affs_inode_info *ei; - ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,SLAB_KERNEL ); + ei = (struct affs_inode_info *)kmem_cache_alloc (affs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
fs/afs/super.c +1 -1
@@ -484,7 +484,7 @@ static struct inode *afs_alloc_inode(str {afs_vnode_t *vnode; - vnode = (afs_vnode_t *)kmem_cache_alloc (afs_inode_cachep,SLAB_KERNEL ); + vnode = (afs_vnode_t *)kmem_cache_alloc (afs_inode_cachep,GFP_KERNEL );if (!vnode)return NULL ;
fs/befs/linuxvfs.c +1 -1
@@ -282,7 +282,7 @@ befs_alloc_inode(struct super_block *sb) {struct befs_inode_info *bi; bi = (struct befs_inode_info *)kmem_cache_alloc (befs_inode_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (!bi)return NULL ;return &bi->vfs_inode;
fs/bfs/inode.c +1 -1
@@ -219,7 +219,7 @@ static kmem_cache_t * bfs_inode_cachep;static struct inode *bfs_alloc_inode (struct super_block *sb) {struct bfs_inode_info *bi; - bi =kmem_cache_alloc (bfs_inode_cachep,SLAB_KERNEL ); + bi =kmem_cache_alloc (bfs_inode_cachep,GFP_KERNEL );if (!bi)return NULL ;return &bi->vfs_inode;
fs/block_dev.c +1 -1
@@ -223,7 +223,7 @@ static spinlock_t bdev_lock __cacheline_static kmem_cache_t * bdev_cachep;#define alloc_bdev () \ - ((struct block_device *) kmem_cache_alloc(bdev_cachep, SLAB_KERNEL)) + ((struct block_device *) kmem_cache_alloc(bdev_cachep, GFP_KERNEL))#define destroy_bdev (bdev) kmem_cache_free(bdev_cachep, (bdev))static void init_once (void * foo,kmem_cache_t * cachep,unsigned long flags)
fs/char_dev.c +1 -1
@@ -35,7 +35,7 @@ static spinlock_t cdev_lock = SPIN_LOCK_static kmem_cache_t * cdev_cachep;#define alloc_cdev () \ - ((struct char_device *) kmem_cache_alloc(cdev_cachep, SLAB_KERNEL)) + ((struct char_device *) kmem_cache_alloc(cdev_cachep, GFP_KERNEL))#define destroy_cdev (cdev) kmem_cache_free(cdev_cachep, (cdev))static void init_once (void *foo,kmem_cache_t *cachep,unsigned long flags)
fs/cifs/cifsfs.c +1 -1
@@ -174,7 +174,7 @@ cifs_alloc_inode(struct super_block *sb)struct cifsInodeInfo *cifs_inode; cifs_inode = (struct cifsInodeInfo *)kmem_cache_alloc (cifs_inode_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (!cifs_inode)return NULL ; cifs_inode->cifsAttrs =0x20 ;/* default */
fs/cifs/misc.c +1 -1
@@ -153,7 +153,7 @@ buf_get(void)but it may be more efficient to always alloc same size albeit slightly larger */ ret_buf = - (struct smb_hdr *)kmem_cache_alloc (cifs_req_cachep,SLAB_KERNEL ); + (struct smb_hdr *)kmem_cache_alloc (cifs_req_cachep,GFP_KERNEL );/* clear the first few header bytes */ if (ret_buf) {
fs/cifs/transport.c +1 -1
@@ -45,7 +45,7 @@ AllocMidQEntry(struct smb_hdr *smb_buffe } temp =kmalloc (sizeof (struct mid_q_entry ),GFP_KERNEL ); temp = (struct mid_q_entry *)kmem_cache_alloc (cifs_mid_cachep, -SLAB_KERNEL ); +GFP_KERNEL );if (temp ==NULL )return temp;else {
fs/coda/inode.c +1 -1
@@ -41,7 +41,7 @@ static kmem_cache_t * coda_inode_cachep;static struct inode *coda_alloc_inode (struct super_block *sb) {struct coda_inode_info *ei; - ei = (struct coda_inode_info *)kmem_cache_alloc (coda_inode_cachep,SLAB_KERNEL ); + ei = (struct coda_inode_info *)kmem_cache_alloc (coda_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;memset (&ei->c_fid,0 ,sizeof (struct ViceFid ));
fs/devfs/base.c +2 -2
@@ -577,7 +577,7 @@ Added process group check for devfsd privileges. v1.4 20011204 Richard Gooch <[email protected]> - Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. + Use GFP_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. v1.5 20011211 Richard Gooch <[email protected]> Return old entry in <devfs_mk_dir> for 2.4.x kernels.
@@ -1407,7 +1407,7 @@ static int devfsd_notify_de (struct devfif ( !( fs_info->devfsd_event_mask & (1 << type) ) )return (FALSE);if ( ( entry =kmem_cache_alloc (devfsd_buf_cache, - atomic ?SLAB_ATOMIC :SLAB_KERNEL ) ) + atomic ?GFP_ATOMIC :GFP_KERNEL ) ) ==NULL ) {atomic_inc (&fs_info->devfsd_overrun_count);
fs/dnotify.c +1 -1
@@ -79,7 +79,7 @@ int fcntl_dirnotify(int fd, struct file inode = filp->f_dentry->d_inode;if (!S_ISDIR (inode->i_mode))return -ENOTDIR ; - dn =kmem_cache_alloc (dn_cache,SLAB_KERNEL ); + dn =kmem_cache_alloc (dn_cache,GFP_KERNEL );if (dn ==NULL )return -ENOMEM ;write_lock (&dn_lock);
fs/dquot.c +1 -1
@@ -474,7 +474,7 @@ static struct dquot *get_empty_dquot(str {struct dquot *dquot; - dquot =kmem_cache_alloc (dquot_cachep,SLAB_KERNEL ); + dquot =kmem_cache_alloc (dquot_cachep,GFP_KERNEL );if (!dquot)return NODQUOT ;
fs/efs/super.c +1 -1
@@ -34,7 +34,7 @@ static kmem_cache_t * efs_inode_cachep;static struct inode *efs_alloc_inode (struct super_block *sb) {struct efs_inode_info *ei; - ei = (struct efs_inode_info *)kmem_cache_alloc (efs_inode_cachep,SLAB_KERNEL ); + ei = (struct efs_inode_info *)kmem_cache_alloc (efs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/eventpoll.c +2 -2
@@ -81,13 +81,13 @@ ((1 << (hbits)) % EP_HENTRY_X_PAGE ? 1: 0)))/* Macro to allocate a "struct epitem" from the slab cache */ -#define EPI_MEM_ALLOC () (struct epitem *) kmem_cache_alloc(epi_cache, SLAB_KERNEL) +#define EPI_MEM_ALLOC () (struct epitem *) kmem_cache_alloc(epi_cache, GFP_KERNEL)/* Macro to free a "struct epitem" to the slab cache */ #define EPI_MEM_FREE (p) kmem_cache_free(epi_cache, p)/* Macro to allocate a "struct eppoll_entry" from the slab cache */ -#define PWQ_MEM_ALLOC () (struct eppoll_entry *) kmem_cache_alloc(pwq_cache, SLAB_KERNEL) +#define PWQ_MEM_ALLOC () (struct eppoll_entry *) kmem_cache_alloc(pwq_cache, GFP_KERNEL)/* Macro to free a "struct eppoll_entry" to the slab cache */ #define PWQ_MEM_FREE (p) kmem_cache_free(pwq_cache, p)
fs/exec.c +1 -1
@@ -388,7 +388,7 @@ int setup_arg_pages(struct linux_binprm bprm->loader += stack_base; bprm->exec += stack_base; - mpnt =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + mpnt =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!mpnt)return -ENOMEM ;
fs/ext2/super.c +1 -1
@@ -154,7 +154,7 @@ static kmem_cache_t * ext2_inode_cachep;static struct inode *ext2_alloc_inode (struct super_block *sb) {struct ext2_inode_info *ei; - ei = (struct ext2_inode_info *)kmem_cache_alloc (ext2_inode_cachep,SLAB_KERNEL ); + ei = (struct ext2_inode_info *)kmem_cache_alloc (ext2_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;#ifdef CONFIG_EXT2_FS_POSIX_ACL
fs/ext3/super.c +1 -1
@@ -429,7 +429,7 @@ static struct inode *ext3_alloc_inode(st {struct ext3_inode_info *ei; - ei =kmem_cache_alloc (ext3_inode_cachep,SLAB_NOFS ); + ei =kmem_cache_alloc (ext3_inode_cachep,GFP_NOFS );if (!ei)return NULL ;#ifdef CONFIG_EXT3_FS_POSIX_ACL
fs/fat/inode.c +1 -1
@@ -672,7 +672,7 @@ static kmem_cache_t *fat_inode_cachep;static struct inode *fat_alloc_inode (struct super_block *sb) {struct msdos_inode_info *ei; - ei = (struct msdos_inode_info *)kmem_cache_alloc (fat_inode_cachep,SLAB_KERNEL ); + ei = (struct msdos_inode_info *)kmem_cache_alloc (fat_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/fcntl.c +1 -1
@@ -550,7 +550,7 @@ int fasync_helper(int fd, struct file *int result =0 ;if (on) { - new =kmem_cache_alloc (fasync_cache,SLAB_KERNEL ); + new =kmem_cache_alloc (fasync_cache,GFP_KERNEL );if (!new)return -ENOMEM ; }
fs/file_table.c +1 -1
@@ -74,7 +74,7 @@ struct file * get_empty_filp(void)*/ if (files_stat.nr_files < files_stat.max_files) {file_list_unlock (); - f =kmem_cache_alloc (filp_cachep,SLAB_KERNEL ); + f =kmem_cache_alloc (filp_cachep,GFP_KERNEL );file_list_lock ();if (f) { files_stat.nr_files++;
fs/freevxfs/vxfs_fshead.c +1 -1
@@ -83,7 +83,7 @@ vxfs_getfsh(struct inode *ip, int which)if (buffer_mapped (bp)) {struct vxfs_fsh *fhp; -if (!(fhp =kmalloc (sizeof (*fhp),SLAB_KERNEL ))) +if (!(fhp =kmalloc (sizeof (*fhp),GFP_KERNEL )))return NULL ;memcpy (fhp, bp->b_data,sizeof (*fhp));
fs/freevxfs/vxfs_inode.c +2 -2
@@ -114,7 +114,7 @@ vxfs_blkiget(struct super_block *sbp, u_struct vxfs_inode_info *vip;struct vxfs_dinode *dip; -if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,SLAB_KERNEL ))) +if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,GFP_KERNEL ))) goto fail; dip = (struct vxfs_dinode *)(bp->b_data + offset);memcpy (vip, dip,sizeof (*vip));
@@ -156,7 +156,7 @@ __vxfs_iget(ino_t ino, struct inode *ilistruct vxfs_dinode *dip;caddr_t kaddr = (char *)page_address (pp); -if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,SLAB_KERNEL ))) +if (!(vip =kmem_cache_alloc (vxfs_inode_cachep,GFP_KERNEL ))) goto fail; dip = (struct vxfs_dinode *)(kaddr + offset);memcpy (vip, dip,sizeof (*vip));
fs/hfs/super.c +1 -1
@@ -48,7 +48,7 @@ static kmem_cache_t * hfs_inode_cachep;static struct inode *hfs_alloc_inode (struct super_block *sb) {struct hfs_inode_info *ei; - ei = (struct hfs_inode_info *)kmem_cache_alloc (hfs_inode_cachep,SLAB_KERNEL ); + ei = (struct hfs_inode_info *)kmem_cache_alloc (hfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/hpfs/super.c +1 -1
@@ -164,7 +164,7 @@ static kmem_cache_t * hpfs_inode_cachep;static struct inode *hpfs_alloc_inode (struct super_block *sb) {struct hpfs_inode_info *ei; - ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,SLAB_KERNEL ); + ei = (struct hpfs_inode_info *)kmem_cache_alloc (hpfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
fs/inode.c +1 -1
@@ -97,7 +97,7 @@ static struct inode *alloc_inode(structif (sb->s_op->alloc_inode) inode = sb->s_op->alloc_inode (sb);else - inode = (struct inode *)kmem_cache_alloc (inode_cachep,SLAB_KERNEL ); + inode = (struct inode *)kmem_cache_alloc (inode_cachep,GFP_KERNEL );if (inode) {struct address_space *const mapping = &inode->i_data;
fs/intermezzo/dcache.c +1 -1
@@ -234,7 +234,7 @@ inline struct presto_dentry_data *izo_al {struct presto_dentry_data *dd; - dd =kmem_cache_alloc (presto_dentry_slab,SLAB_KERNEL ); + dd =kmem_cache_alloc (presto_dentry_slab,GFP_KERNEL );if (dd ==NULL ) {CERROR ("IZO: out of memory trying to allocate presto_dentry_data\n" );return NULL ;
fs/isofs/inode.c +1 -1
@@ -81,7 +81,7 @@ static kmem_cache_t *isofs_inode_cachep;static struct inode *isofs_alloc_inode (struct super_block *sb) {struct iso_inode_info *ei; - ei = (struct iso_inode_info *)kmem_cache_alloc (isofs_inode_cachep,SLAB_KERNEL ); + ei = (struct iso_inode_info *)kmem_cache_alloc (isofs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/jffs/jffs_fm.c +2 -2
@@ -706,7 +706,7 @@ struct jffs_fm *jffs_alloc_fm(void) {struct jffs_fm *fm; - fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); + fm =kmem_cache_alloc (fm_cache,GFP_KERNEL ); DJM(if (fm) no_jffs_fm++;);return fm;
@@ -724,7 +724,7 @@ struct jffs_node *jffs_alloc_node(void) {struct jffs_node *n; - n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL ); + n = (struct jffs_node *)kmem_cache_alloc (node_cache,GFP_KERNEL );if (n !=NULL ) no_jffs_node++;return n;
fs/jffs2/super.c +1 -1
@@ -36,7 +36,7 @@ static kmem_cache_t *jffs2_inode_cachep;static struct inode *jffs2_alloc_inode (struct super_block *sb) {struct jffs2_inode_info *ei; - ei = (struct jffs2_inode_info *)kmem_cache_alloc (jffs2_inode_cachep,SLAB_KERNEL ); + ei = (struct jffs2_inode_info *)kmem_cache_alloc (jffs2_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/locks.c +1 -1
@@ -148,7 +148,7 @@ static struct file_lock *locks_alloc_locstruct file_lock *fl;if (account && current->locks >= current->rlim[RLIMIT_LOCKS ].rlim_cur)return NULL ; - fl =kmem_cache_alloc (filelock_cache,SLAB_KERNEL ); + fl =kmem_cache_alloc (filelock_cache,GFP_KERNEL );if (fl) current->locks++;return fl;
fs/minix/inode.c +1 -1
@@ -55,7 +55,7 @@ static kmem_cache_t * minix_inode_cachepstatic struct inode *minix_alloc_inode (struct super_block *sb) {struct minix_inode_info *ei; - ei = (struct minix_inode_info *)kmem_cache_alloc (minix_inode_cachep,SLAB_KERNEL ); + ei = (struct minix_inode_info *)kmem_cache_alloc (minix_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/ncpfs/inode.c +1 -1
@@ -46,7 +46,7 @@ static kmem_cache_t * ncp_inode_cachep;static struct inode *ncp_alloc_inode (struct super_block *sb) {struct ncp_inode_info *ei; - ei = (struct ncp_inode_info *)kmem_cache_alloc (ncp_inode_cachep,SLAB_KERNEL ); + ei = (struct ncp_inode_info *)kmem_cache_alloc (ncp_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/nfs/inode.c +1 -1
@@ -1520,7 +1520,7 @@ static kmem_cache_t * nfs_inode_cachep;static struct inode *nfs_alloc_inode (struct super_block *sb) {struct nfs_inode *nfsi; - nfsi = (struct nfs_inode *)kmem_cache_alloc (nfs_inode_cachep,SLAB_KERNEL ); + nfsi = (struct nfs_inode *)kmem_cache_alloc (nfs_inode_cachep,GFP_KERNEL );if (!nfsi)return NULL ; nfsi->flags =0 ;
fs/nfs/pagelist.c +1 -1
@@ -32,7 +32,7 @@ static inline struct nfs_page *nfs_page_alloc (void) {struct nfs_page *p; - p =kmem_cache_alloc (nfs_page_cachep,SLAB_NOFS ); + p =kmem_cache_alloc (nfs_page_cachep,GFP_NOFS );if (p) {memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->wb_list);
fs/nfs/read.c +1 -1
@@ -44,7 +44,7 @@ static mempool_t *nfs_rdata_mempool;static __inline__struct nfs_read_data *nfs_readdata_alloc (void ) {struct nfs_read_data *p; - p = (struct nfs_read_data *)mempool_alloc (nfs_rdata_mempool,SLAB_NOFS ); + p = (struct nfs_read_data *)mempool_alloc (nfs_rdata_mempool,GFP_NOFS );if (p) {memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->pages);
fs/nfs/write.c +2 -2
@@ -83,7 +83,7 @@ static mempool_t *nfs_commit_mempool;static __inline__struct nfs_write_data *nfs_writedata_alloc (void ) {struct nfs_write_data *p; - p = (struct nfs_write_data *)mempool_alloc (nfs_wdata_mempool,SLAB_NOFS ); + p = (struct nfs_write_data *)mempool_alloc (nfs_wdata_mempool,GFP_NOFS );if (p) {memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->pages);
@@ -105,7 +105,7 @@ void nfs_writedata_release(struct rpc_tastatic __inline__struct nfs_write_data *nfs_commit_alloc (void ) {struct nfs_write_data *p; - p = (struct nfs_write_data *)mempool_alloc (nfs_commit_mempool,SLAB_NOFS ); + p = (struct nfs_write_data *)mempool_alloc (nfs_commit_mempool,GFP_NOFS );if (p) {memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->pages);
fs/ntfs/attrib.c +1 -1
@@ -1694,7 +1694,7 @@ attr_search_context *get_attr_search_ctx {attr_search_context *ctx; - ctx =kmem_cache_alloc (ntfs_attr_ctx_cache,SLAB_NOFS ); + ctx =kmem_cache_alloc (ntfs_attr_ctx_cache,GFP_NOFS );if (ctx)init_attr_search_ctx (ctx, ni, mrec);return ctx;
fs/ntfs/inode.c +2 -2
@@ -267,7 +267,7 @@ struct inode *ntfs_alloc_big_inode(strucntfs_debug ("Entering." ); ni = (ntfs_inode *)kmem_cache_alloc (ntfs_big_inode_cache, -SLAB_NOFS ); +GFP_NOFS );if (likely (ni !=NULL )) { ni->state =0 ;return VFS_I (ni);
@@ -292,7 +292,7 @@ static inline ntfs_inode *ntfs_alloc_extntfs_inode *ni;ntfs_debug ("Entering." ); - ni = (ntfs_inode *)kmem_cache_alloc (ntfs_inode_cache,SLAB_NOFS ); + ni = (ntfs_inode *)kmem_cache_alloc (ntfs_inode_cache,GFP_NOFS );if (likely (ni !=NULL )) { ni->state =0 ;return ni;
fs/ntfs/unistr.c +1 -1
@@ -261,7 +261,7 @@ int ntfs_nlstoucs(const ntfs_volume *vol/* We don't trust outside sources. */ if (ins) { - ucs = (uchar_t *)kmem_cache_alloc (ntfs_name_cache,SLAB_NOFS ); + ucs = (uchar_t *)kmem_cache_alloc (ntfs_name_cache,GFP_NOFS );if (ucs) {for (i = o =0 ; i < ins_len; i += wc_len) { wc_len = nls->char2uni(ins + i, ins_len - i,
fs/proc/inode.c +1 -1
@@ -92,7 +92,7 @@ static struct inode *proc_alloc_inode(ststruct proc_inode *ei;struct inode *inode; - ei = (struct proc_inode *)kmem_cache_alloc (proc_inode_cachep,SLAB_KERNEL ); + ei = (struct proc_inode *)kmem_cache_alloc (proc_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->task =NULL ;
fs/qnx4/inode.c +1 -1
@@ -515,7 +515,7 @@ static kmem_cache_t *qnx4_inode_cachep;static struct inode *qnx4_alloc_inode (struct super_block *sb) {struct qnx4_inode_info *ei; - ei =kmem_cache_alloc (qnx4_inode_cachep,SLAB_KERNEL ); + ei =kmem_cache_alloc (qnx4_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/reiserfs/super.c +1 -1
@@ -414,7 +414,7 @@ static kmem_cache_t * reiserfs_inode_cacstatic struct inode *reiserfs_alloc_inode (struct super_block *sb) {struct reiserfs_inode_info *ei; - ei = (struct reiserfs_inode_info *)kmem_cache_alloc (reiserfs_inode_cachep,SLAB_KERNEL ); + ei = (struct reiserfs_inode_info *)kmem_cache_alloc (reiserfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/romfs/inode.c +1 -1
@@ -554,7 +554,7 @@ static kmem_cache_t * romfs_inode_cachepstatic struct inode *romfs_alloc_inode (struct super_block *sb) {struct romfs_inode_info *ei; - ei = (struct romfs_inode_info *)kmem_cache_alloc (romfs_inode_cachep,SLAB_KERNEL ); + ei = (struct romfs_inode_info *)kmem_cache_alloc (romfs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/smbfs/inode.c +1 -1
@@ -55,7 +55,7 @@ static kmem_cache_t *smb_inode_cachep;static struct inode *smb_alloc_inode (struct super_block *sb) {struct smb_inode_info *ei; - ei = (struct smb_inode_info *)kmem_cache_alloc (smb_inode_cachep,SLAB_KERNEL ); + ei = (struct smb_inode_info *)kmem_cache_alloc (smb_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/smbfs/request.c +1 -1
@@ -60,7 +60,7 @@ static struct smb_request *smb_do_alloc_struct smb_request *req;unsigned char *buf =NULL ; - req =kmem_cache_alloc (req_cachep,SLAB_KERNEL ); + req =kmem_cache_alloc (req_cachep,GFP_KERNEL );VERBOSE ("allocating request: %p\n" , req);if (!req) goto out;
fs/sysv/inode.c +1 -1
@@ -293,7 +293,7 @@ static struct inode *sysv_alloc_inode(st {struct sysv_inode_info *si; - si =kmem_cache_alloc (sysv_inode_cachep,SLAB_KERNEL ); + si =kmem_cache_alloc (sysv_inode_cachep,GFP_KERNEL );if (!si)return NULL ;return &si->vfs_inode;
fs/udf/super.c +1 -1
@@ -117,7 +117,7 @@ static kmem_cache_t * udf_inode_cachep;static struct inode *udf_alloc_inode (struct super_block *sb) {struct udf_inode_info *ei; - ei = (struct udf_inode_info *)kmem_cache_alloc (udf_inode_cachep,SLAB_KERNEL ); + ei = (struct udf_inode_info *)kmem_cache_alloc (udf_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;return &ei->vfs_inode;
fs/ufs/super.c +1 -1
@@ -1004,7 +1004,7 @@ static kmem_cache_t * ufs_inode_cachep;static struct inode *ufs_alloc_inode (struct super_block *sb) {struct ufs_inode_info *ei; - ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,SLAB_KERNEL ); + ei = (struct ufs_inode_info *)kmem_cache_alloc (ufs_inode_cachep,GFP_KERNEL );if (!ei)return NULL ; ei->vfs_inode.i_version =1 ;
include/linux/fs.h +1 -1
@@ -1026,7 +1026,7 @@ extern char * getname(const char *);/* fs/dcache.c */ extern void vfs_caches_init (unsigned long ); -#define __getname () kmem_cache_alloc(names_cachep, SLAB_KERNEL) +#define __getname () kmem_cache_alloc(names_cachep, GFP_KERNEL)#define putname (name) kmem_cache_free(names_cachep, (void *)(name))enum {BDEV_FILE ,BDEV_SWAP ,BDEV_FS ,BDEV_RAW };
include/linux/slab.h +0 -8
@@ -14,14 +14,6 @@ typedef struct kmem_cache_s kmem_cache_t#include <linux/gfp.h> #include <linux/types.h> -/* flags for kmem_cache_alloc() */ -#define SLAB_NOFS GFP_NOFS -#define SLAB_NOIO GFP_NOIO -#define SLAB_ATOMIC GFP_ATOMIC -#define SLAB_USER GFP_USER -#define SLAB_KERNEL GFP_KERNEL -#define SLAB_DMA GFP_DMA -#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN)#define SLAB_NO_GROW 0x00001000UL/* don't grow a cache */
include/net/tcp.h +1 -1
@@ -539,7 +539,7 @@ struct open_request {/* SLAB cache for open requests. */ extern kmem_cache_t *tcp_openreq_cachep; -#define tcp_openreq_alloc () kmem_cache_alloc(tcp_openreq_cachep, SLAB_ATOMIC) +#define tcp_openreq_alloc () kmem_cache_alloc(tcp_openreq_cachep, GFP_ATOMIC)#define tcp_openreq_fastfree (req) kmem_cache_free(tcp_openreq_cachep, req)static inline void tcp_openreq_free (struct open_request *req)
kernel/fork.c +3 -3
@@ -261,7 +261,7 @@ static inline int dup_mmap(struct mm_str goto fail_nomem; charge += len; } - tmp =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + tmp =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!tmp) goto fail_nomem; *tmp = *mpnt;
@@ -333,7 +333,7 @@ static inline void mm_free_pgd(struct mm spinlock_t mmlist_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;int mmlist_nr; -#define allocate_mm () (kmem_cache_alloc(mm_cachep, SLAB_KERNEL)) +#define allocate_mm () (kmem_cache_alloc(mm_cachep, GFP_KERNEL))#define free_mm (mm) (kmem_cache_free(mm_cachep, (mm)))#include <linux/init_task.h>
@@ -576,7 +576,7 @@ static int copy_files(unsigned long clon tsk->files =NULL ; error = -ENOMEM ; - newf =kmem_cache_alloc (files_cachep,SLAB_KERNEL ); + newf =kmem_cache_alloc (files_cachep,GFP_KERNEL );if (!newf) goto out;
kernel/user.c +1 -1
@@ -90,7 +90,7 @@ struct user_struct * alloc_uid(uid_t uidif (!up) {struct user_struct *new; - new =kmem_cache_alloc (uid_cachep,SLAB_KERNEL ); + new =kmem_cache_alloc (uid_cachep,GFP_KERNEL );if (!new)return NULL ; new->uid = uid;
mm/mmap.c +3 -3
@@ -643,7 +643,7 @@ munmap_back:* specific mapper. the address has already been validated, but * not unmapped, but the maps are removed from the list. */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL ); error = -ENOMEM ;if (!vma) goto unacct_error;
@@ -1179,7 +1179,7 @@ int split_vma(struct mm_struct * mm, strif (mm->map_count >=MAX_MAP_COUNT )return -ENOMEM ; - new =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + new =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!new)return -ENOMEM ;
@@ -1346,7 +1346,7 @@ unsigned long do_brk(unsigned long addr,/* * create a vma struct for an anonymous mapping */ - vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!vma) {vm_unacct_memory (len >>PAGE_SHIFT );return -ENOMEM ;
mm/mremap.c +1 -1
@@ -237,7 +237,7 @@ static unsigned long move_vma(struct vm_ allocated_vma =0 ;if (!new_vma) { - new_vma =kmem_cache_alloc (vm_area_cachep,SLAB_KERNEL ); + new_vma =kmem_cache_alloc (vm_area_cachep,GFP_KERNEL );if (!new_vma) goto out; allocated_vma =1 ;
mm/shmem.c +1 -1
@@ -1760,7 +1760,7 @@ static kmem_cache_t *shmem_inode_cachep;static struct inode *shmem_alloc_inode (struct super_block *sb) {struct shmem_inode_info *p; - p = (struct shmem_inode_info *)kmem_cache_alloc (shmem_inode_cachep,SLAB_KERNEL ); + p = (struct shmem_inode_info *)kmem_cache_alloc (shmem_inode_cachep,GFP_KERNEL );if (!p)return NULL ;return &p->vfs_inode;
mm/slab.c +3 -3
@@ -904,7 +904,7 @@ kmem_cache_create (const char *name, sizBUG ();/* Get cache's description obj. */ - cachep = (kmem_cache_t *)kmem_cache_alloc (&cache_cache,SLAB_KERNEL ); + cachep = (kmem_cache_t *)kmem_cache_alloc (&cache_cache,GFP_KERNEL );if (!cachep) goto opps;memset (cachep,0 ,sizeof (kmem_cache_t));
@@ -1320,7 +1320,7 @@ static void cache_init_objs (kmem_cache_static void kmem_flagcheck (kmem_cache_t *cachep,int flags) { -if (flags &SLAB_DMA ) { +if (flags &GFP_DMA ) {if (!(cachep->gfpflags &GFP_DMA ))BUG (); }else {
@@ -1345,7 +1345,7 @@ static int cache_grow (kmem_cache_t * ca/* Be lazy and only check for valid flags here, * keeping it out of the critical path in kmem_cache_alloc(). */ -if (flags & ~(SLAB_DMA |SLAB_LEVEL_MASK |SLAB_NO_GROW )) +if (flags & ~(GFP_DMA |SLAB_LEVEL_MASK |SLAB_NO_GROW ))BUG ();if (flags &SLAB_NO_GROW )return 0 ;
net/core/dst.c +1 -1
@@ -119,7 +119,7 @@ void * dst_alloc(struct dst_ops * ops)if (ops->gc ())return NULL ; } - dst =kmem_cache_alloc (ops->kmem_cachep,SLAB_ATOMIC ); + dst =kmem_cache_alloc (ops->kmem_cachep,GFP_ATOMIC );if (!dst)return NULL ;memset (dst,0 , ops->entry_size);
net/core/neighbour.c +1 -1
@@ -232,7 +232,7 @@ static struct neighbour *neigh_alloc(str goto out; } - n =kmem_cache_alloc (tbl->kmem_cachep,SLAB_ATOMIC ); + n =kmem_cache_alloc (tbl->kmem_cachep,GFP_ATOMIC );if (!n) goto out;
net/decnet/dn_table.c +1 -1
@@ -530,7 +530,7 @@ create: replace: err = -ENOBUFS ; - new_f =kmem_cache_alloc (dn_hash_kmem,SLAB_KERNEL ); + new_f =kmem_cache_alloc (dn_hash_kmem,GFP_KERNEL );if (new_f ==NULL ) goto out;
net/ipv4/fib_hash.c +1 -1
@@ -561,7 +561,7 @@ create: replace: err = -ENOBUFS ; - new_f =kmem_cache_alloc (fn_hash_kmem,SLAB_KERNEL ); + new_f =kmem_cache_alloc (fn_hash_kmem,GFP_KERNEL );if (new_f ==NULL ) goto out;
net/ipv4/tcp_ipv4.c +1 -1
@@ -129,7 +129,7 @@ struct tcp_bind_bucket *tcp_bucket_creat unsigned short snum) {struct tcp_bind_bucket *tb =kmem_cache_alloc (tcp_bucket_cachep, -SLAB_ATOMIC ); +GFP_ATOMIC );if (tb) { tb->port = snum; tb->fastreuse =0 ;
net/ipv4/tcp_minisocks.c +1 -1
@@ -354,7 +354,7 @@ void tcp_time_wait(struct sock *sk, int recycle_ok = tp->af_specific->remember_stamp (sk);if (tcp_tw_count < sysctl_tcp_max_tw_buckets) - tw =kmem_cache_alloc (tcp_timewait_cachep,SLAB_ATOMIC ); + tw =kmem_cache_alloc (tcp_timewait_cachep,GFP_ATOMIC );if (tw !=NULL ) {struct inet_opt *inet =inet_sk (sk);
net/ipv4/xfrm_input.c +1 -1
@@ -108,7 +108,7 @@ int xfrm4_rcv(struct sk_buff *skb)if (!skb->sp ||atomic_read (&skb->sp->refcnt) !=1 ) {struct sec_path *sp; - sp =kmem_cache_alloc (secpath_cachep,SLAB_ATOMIC ); + sp =kmem_cache_alloc (secpath_cachep,GFP_ATOMIC );if (!sp) goto drop;if (skb->sp) {
net/ipv4/xfrm_policy.c +1 -1
@@ -115,7 +115,7 @@ struct xfrm_policy *flow_lookup(int dir,if (flow_count (cpu) > flow_hwm)flow_cache_shrink (cpu); - fle =kmem_cache_alloc (flow_cachep,SLAB_ATOMIC ); + fle =kmem_cache_alloc (flow_cachep,GFP_ATOMIC );if (fle) {flow_count (cpu)++; fle->fl = *fl;
net/ipv6/ip6_fib.c +1 -1
@@ -211,7 +211,7 @@ static __inline__ struct fib6_node * nod {struct fib6_node *fn; -if ((fn =kmem_cache_alloc (fib6_node_kmem,SLAB_ATOMIC )) !=NULL ) +if ((fn =kmem_cache_alloc (fib6_node_kmem,GFP_ATOMIC )) !=NULL )memset (fn,0 ,sizeof (struct fib6_node ));return fn;
net/socket.c +1 -1
@@ -274,7 +274,7 @@ static kmem_cache_t * sock_inode_cachep;static struct inode *sock_alloc_inode (struct super_block *sb) {struct socket_alloc *ei; - ei = (struct socket_alloc *)kmem_cache_alloc (sock_inode_cachep,SLAB_KERNEL ); + ei = (struct socket_alloc *)kmem_cache_alloc (sock_inode_cachep,GFP_KERNEL );if (!ei)return NULL ;init_waitqueue_head (&ei->socket.wait);
net/sunrpc/rpc_pipe.c +1 -1
@@ -108,7 +108,7 @@ static struct inode * rpc_alloc_inode(struct super_block *sb) {struct rpc_inode *rpci; - rpci = (struct rpc_inode *)kmem_cache_alloc (rpc_inode_cachep,SLAB_KERNEL ); + rpci = (struct rpc_inode *)kmem_cache_alloc (rpc_inode_cachep,GFP_KERNEL );if (!rpci)return NULL ;return &rpci->vfs_inode;
Am Samstag, 15. Februar 2003 12:40 schrieb William Lee Irwin III:
Quoted 2 lines
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.
What is this distinction supposed to do anyway?
Can't we just drop it?
Regards
Oliver
Am Samstag, 15. Februar 2003 12:40 schrieb William Lee Irwin III:
Quoted 2 lines
Quoted 2 lines
Use
SLAB_KERNELandSLAB_ATOMICinstead ofGFP_KERNELandGFP_ATOMICwhen passing args to slab allocation functions.
Quoted 2 lines · Oliver Neukum
What is this distinction supposed to do anyway?
Can't we just drop it?
That's why I followed up with patches that remove them in favor of GFP_*
-- wli