Commit e6b4f8da3a88457148038bc952043e99a7fdba64

Authored by Christoph Lameter
Committed by Linus Torvalds
1 parent 55acbda096

[PATCH] slab: remove SLAB_NOFS

SLAB_NOFS is an alias of GFP_NOFS.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 15 changed files with 17 additions and 18 deletions Side-by-side Diff

... ... @@ -153,7 +153,7 @@
153 153 albeit slightly larger than necessary and maxbuffersize
154 154 defaults to this and can not be bigger */
155 155 ret_buf =
156   - (struct smb_hdr *) mempool_alloc(cifs_req_poolp, SLAB_KERNEL | SLAB_NOFS);
  156 + (struct smb_hdr *) mempool_alloc(cifs_req_poolp, SLAB_KERNEL | GFP_NOFS);
157 157  
158 158 /* clear the first few header bytes */
159 159 /* for most paths, more is cleared in header_assemble */
... ... @@ -192,7 +192,7 @@
192 192 albeit slightly larger than necessary and maxbuffersize
193 193 defaults to this and can not be bigger */
194 194 ret_buf =
195   - (struct smb_hdr *) mempool_alloc(cifs_sm_req_poolp, SLAB_KERNEL | SLAB_NOFS);
  195 + (struct smb_hdr *) mempool_alloc(cifs_sm_req_poolp, SLAB_KERNEL | GFP_NOFS);
196 196 if (ret_buf) {
197 197 /* No need to clear memory here, cleared in header assemble */
198 198 /* memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
... ... @@ -51,7 +51,7 @@
51 51 }
52 52  
53 53 temp = (struct mid_q_entry *) mempool_alloc(cifs_mid_poolp,
54   - SLAB_KERNEL | SLAB_NOFS);
  54 + SLAB_KERNEL | GFP_NOFS);
55 55 if (temp == NULL)
56 56 return temp;
57 57 else {
... ... @@ -600,7 +600,7 @@
600 600 {
601 601 struct dquot *dquot;
602 602  
603   - dquot = kmem_cache_alloc(dquot_cachep, SLAB_NOFS);
  603 + dquot = kmem_cache_alloc(dquot_cachep, GFP_NOFS);
604 604 if(!dquot)
605 605 return NODQUOT;
606 606  
... ... @@ -445,7 +445,7 @@
445 445 {
446 446 struct ext3_inode_info *ei;
447 447  
448   - ei = kmem_cache_alloc(ext3_inode_cachep, SLAB_NOFS);
  448 + ei = kmem_cache_alloc(ext3_inode_cachep, GFP_NOFS);
449 449 if (!ei)
450 450 return NULL;
451 451 #ifdef CONFIG_EXT3_FS_POSIX_ACL
... ... @@ -495,7 +495,7 @@
495 495 {
496 496 struct ext4_inode_info *ei;
497 497  
498   - ei = kmem_cache_alloc(ext4_inode_cachep, SLAB_NOFS);
  498 + ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
499 499 if (!ei)
500 500 return NULL;
501 501 #ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
... ... @@ -165,7 +165,7 @@
165 165 static struct inode *hpfs_alloc_inode(struct super_block *sb)
166 166 {
167 167 struct hpfs_inode_info *ei;
168   - ei = (struct hpfs_inode_info *)kmem_cache_alloc(hpfs_inode_cachep, SLAB_NOFS);
  168 + ei = (struct hpfs_inode_info *)kmem_cache_alloc(hpfs_inode_cachep, GFP_NOFS);
169 169 if (!ei)
170 170 return NULL;
171 171 ei->vfs_inode.i_version = 1;
... ... @@ -46,7 +46,7 @@
46 46 struct nfs_read_data *nfs_readdata_alloc(size_t len)
47 47 {
48 48 unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
49   - struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS);
  49 + struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, GFP_NOFS);
50 50  
51 51 if (p) {
52 52 memset(p, 0, sizeof(*p));
... ... @@ -93,7 +93,7 @@
93 93  
94 94 struct nfs_write_data *nfs_commit_alloc(void)
95 95 {
96   - struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS);
  96 + struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, GFP_NOFS);
97 97  
98 98 if (p) {
99 99 memset(p, 0, sizeof(*p));
... ... @@ -112,7 +112,7 @@
112 112 struct nfs_write_data *nfs_writedata_alloc(size_t len)
113 113 {
114 114 unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
115   - struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS);
  115 + struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, GFP_NOFS);
116 116  
117 117 if (p) {
118 118 memset(p, 0, sizeof(*p));
... ... @@ -1272,7 +1272,7 @@
1272 1272 {
1273 1273 ntfs_attr_search_ctx *ctx;
1274 1274  
1275   - ctx = kmem_cache_alloc(ntfs_attr_ctx_cache, SLAB_NOFS);
  1275 + ctx = kmem_cache_alloc(ntfs_attr_ctx_cache, GFP_NOFS);
1276 1276 if (ctx)
1277 1277 ntfs_attr_init_search_ctx(ctx, ni, mrec);
1278 1278 return ctx;
... ... @@ -38,7 +38,7 @@
38 38 {
39 39 ntfs_index_context *ictx;
40 40  
41   - ictx = kmem_cache_alloc(ntfs_index_ctx_cache, SLAB_NOFS);
  41 + ictx = kmem_cache_alloc(ntfs_index_ctx_cache, GFP_NOFS);
42 42 if (ictx)
43 43 *ictx = (ntfs_index_context){ .idx_ni = idx_ni };
44 44 return ictx;
... ... @@ -324,7 +324,7 @@
324 324 ntfs_inode *ni;
325 325  
326 326 ntfs_debug("Entering.");
327   - ni = kmem_cache_alloc(ntfs_big_inode_cache, SLAB_NOFS);
  327 + ni = kmem_cache_alloc(ntfs_big_inode_cache, GFP_NOFS);
328 328 if (likely(ni != NULL)) {
329 329 ni->state = 0;
330 330 return VFS_I(ni);
... ... @@ -349,7 +349,7 @@
349 349 ntfs_inode *ni;
350 350  
351 351 ntfs_debug("Entering.");
352   - ni = kmem_cache_alloc(ntfs_inode_cache, SLAB_NOFS);
  352 + ni = kmem_cache_alloc(ntfs_inode_cache, GFP_NOFS);
353 353 if (likely(ni != NULL)) {
354 354 ni->state = 0;
355 355 return ni;
... ... @@ -266,7 +266,7 @@
266 266  
267 267 /* We do not trust outside sources. */
268 268 if (likely(ins)) {
269   - ucs = kmem_cache_alloc(ntfs_name_cache, SLAB_NOFS);
  269 + ucs = kmem_cache_alloc(ntfs_name_cache, GFP_NOFS);
270 270 if (likely(ucs)) {
271 271 for (i = o = 0; i < ins_len; i += wc_len) {
272 272 wc_len = nls->char2uni(ins + i, ins_len - i,
fs/ocfs2/dlm/dlmfs.c
... ... @@ -276,7 +276,7 @@
276 276 {
277 277 struct dlmfs_inode_private *ip;
278 278  
279   - ip = kmem_cache_alloc(dlmfs_inode_cache, SLAB_NOFS);
  279 + ip = kmem_cache_alloc(dlmfs_inode_cache, GFP_NOFS);
280 280 if (!ip)
281 281 return NULL;
282 282  
... ... @@ -303,7 +303,7 @@
303 303 {
304 304 struct ocfs2_inode_info *oi;
305 305  
306   - oi = kmem_cache_alloc(ocfs2_inode_cachep, SLAB_NOFS);
  306 + oi = kmem_cache_alloc(ocfs2_inode_cachep, GFP_NOFS);
307 307 if (!oi)
308 308 return NULL;
309 309  
include/linux/slab.h
... ... @@ -19,7 +19,6 @@
19 19 #include <asm/cache.h> /* kmalloc_sizes.h needs L1_CACHE_BYTES */
20 20  
21 21 /* flags for kmem_cache_alloc() */
22   -#define SLAB_NOFS GFP_NOFS
23 22 #define SLAB_ATOMIC GFP_ATOMIC
24 23 #define SLAB_USER GFP_USER
25 24 #define SLAB_KERNEL GFP_KERNEL