浏览代码

[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>
Christoph Lameter 18 年之前
父节点
当前提交
e6b4f8da3a
共有 15 个文件被更改,包括 17 次插入18 次删除
  1. 2 2
      fs/cifs/misc.c
  2. 1 1
      fs/cifs/transport.c
  3. 1 1
      fs/dquot.c
  4. 1 1
      fs/ext3/super.c
  5. 1 1
      fs/ext4/super.c
  6. 1 1
      fs/hpfs/super.c
  7. 1 1
      fs/nfs/read.c
  8. 2 2
      fs/nfs/write.c
  9. 1 1
      fs/ntfs/attrib.c
  10. 1 1
      fs/ntfs/index.c
  11. 2 2
      fs/ntfs/inode.c
  12. 1 1
      fs/ntfs/unistr.c
  13. 1 1
      fs/ocfs2/dlm/dlmfs.c
  14. 1 1
      fs/ocfs2/super.c
  15. 0 1
      include/linux/slab.h

+ 2 - 2
fs/cifs/misc.c

@@ -153,7 +153,7 @@ cifs_buf_get(void)
    albeit slightly larger than necessary and maxbuffersize 
    albeit slightly larger than necessary and maxbuffersize 
    defaults to this and can not be bigger */
    defaults to this and can not be bigger */
 	ret_buf =
 	ret_buf =
-	    (struct smb_hdr *) mempool_alloc(cifs_req_poolp, SLAB_KERNEL | SLAB_NOFS);
+	    (struct smb_hdr *) mempool_alloc(cifs_req_poolp, SLAB_KERNEL | GFP_NOFS);
 
 
 	/* clear the first few header bytes */
 	/* clear the first few header bytes */
 	/* for most paths, more is cleared in header_assemble */
 	/* for most paths, more is cleared in header_assemble */
@@ -192,7 +192,7 @@ cifs_small_buf_get(void)
    albeit slightly larger than necessary and maxbuffersize 
    albeit slightly larger than necessary and maxbuffersize 
    defaults to this and can not be bigger */
    defaults to this and can not be bigger */
 	ret_buf =
 	ret_buf =
-	    (struct smb_hdr *) mempool_alloc(cifs_sm_req_poolp, SLAB_KERNEL | SLAB_NOFS);
+	    (struct smb_hdr *) mempool_alloc(cifs_sm_req_poolp, SLAB_KERNEL | GFP_NOFS);
 	if (ret_buf) {
 	if (ret_buf) {
 	/* No need to clear memory here, cleared in header assemble */
 	/* No need to clear memory here, cleared in header assemble */
 	/*	memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
 	/*	memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/

+ 1 - 1
fs/cifs/transport.c

@@ -51,7 +51,7 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct cifsSesInfo *ses)
 	}
 	}
 	
 	
 	temp = (struct mid_q_entry *) mempool_alloc(cifs_mid_poolp,
 	temp = (struct mid_q_entry *) mempool_alloc(cifs_mid_poolp,
-						    SLAB_KERNEL | SLAB_NOFS);
+						    SLAB_KERNEL | GFP_NOFS);
 	if (temp == NULL)
 	if (temp == NULL)
 		return temp;
 		return temp;
 	else {
 	else {

+ 1 - 1
fs/dquot.c

@@ -600,7 +600,7 @@ static struct dquot *get_empty_dquot(struct super_block *sb, int type)
 {
 {
 	struct dquot *dquot;
 	struct dquot *dquot;
 
 
-	dquot = kmem_cache_alloc(dquot_cachep, SLAB_NOFS);
+	dquot = kmem_cache_alloc(dquot_cachep, GFP_NOFS);
 	if(!dquot)
 	if(!dquot)
 		return NODQUOT;
 		return NODQUOT;
 
 

+ 1 - 1
fs/ext3/super.c

@@ -445,7 +445,7 @@ static struct inode *ext3_alloc_inode(struct super_block *sb)
 {
 {
 	struct ext3_inode_info *ei;
 	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)
 	if (!ei)
 		return NULL;
 		return NULL;
 #ifdef CONFIG_EXT3_FS_POSIX_ACL
 #ifdef CONFIG_EXT3_FS_POSIX_ACL

+ 1 - 1
fs/ext4/super.c

@@ -495,7 +495,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
 {
 {
 	struct ext4_inode_info *ei;
 	struct ext4_inode_info *ei;
 
 
-	ei = kmem_cache_alloc(ext4_inode_cachep, SLAB_NOFS);
+	ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
 	if (!ei)
 	if (!ei)
 		return NULL;
 		return NULL;
 #ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
 #ifdef CONFIG_EXT4DEV_FS_POSIX_ACL

+ 1 - 1
fs/hpfs/super.c

@@ -165,7 +165,7 @@ static kmem_cache_t * hpfs_inode_cachep;
 static struct inode *hpfs_alloc_inode(struct super_block *sb)
 static struct inode *hpfs_alloc_inode(struct super_block *sb)
 {
 {
 	struct hpfs_inode_info *ei;
 	struct hpfs_inode_info *ei;
-	ei = (struct hpfs_inode_info *)kmem_cache_alloc(hpfs_inode_cachep, SLAB_NOFS);
+	ei = (struct hpfs_inode_info *)kmem_cache_alloc(hpfs_inode_cachep, GFP_NOFS);
 	if (!ei)
 	if (!ei)
 		return NULL;
 		return NULL;
 	ei->vfs_inode.i_version = 1;
 	ei->vfs_inode.i_version = 1;

+ 1 - 1
fs/nfs/read.c

@@ -46,7 +46,7 @@ static mempool_t *nfs_rdata_mempool;
 struct nfs_read_data *nfs_readdata_alloc(size_t len)
 struct nfs_read_data *nfs_readdata_alloc(size_t len)
 {
 {
 	unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
-	struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS);
+	struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, GFP_NOFS);
 
 
 	if (p) {
 	if (p) {
 		memset(p, 0, sizeof(*p));
 		memset(p, 0, sizeof(*p));

+ 2 - 2
fs/nfs/write.c

@@ -93,7 +93,7 @@ static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion);
 
 
 struct nfs_write_data *nfs_commit_alloc(void)
 struct nfs_write_data *nfs_commit_alloc(void)
 {
 {
-	struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS);
+	struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, GFP_NOFS);
 
 
 	if (p) {
 	if (p) {
 		memset(p, 0, sizeof(*p));
 		memset(p, 0, sizeof(*p));
@@ -112,7 +112,7 @@ void nfs_commit_free(struct nfs_write_data *p)
 struct nfs_write_data *nfs_writedata_alloc(size_t len)
 struct nfs_write_data *nfs_writedata_alloc(size_t len)
 {
 {
 	unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
-	struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS);
+	struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, GFP_NOFS);
 
 
 	if (p) {
 	if (p) {
 		memset(p, 0, sizeof(*p));
 		memset(p, 0, sizeof(*p));

+ 1 - 1
fs/ntfs/attrib.c

@@ -1272,7 +1272,7 @@ ntfs_attr_search_ctx *ntfs_attr_get_search_ctx(ntfs_inode *ni, MFT_RECORD *mrec)
 {
 {
 	ntfs_attr_search_ctx *ctx;
 	ntfs_attr_search_ctx *ctx;
 
 
-	ctx = kmem_cache_alloc(ntfs_attr_ctx_cache, SLAB_NOFS);
+	ctx = kmem_cache_alloc(ntfs_attr_ctx_cache, GFP_NOFS);
 	if (ctx)
 	if (ctx)
 		ntfs_attr_init_search_ctx(ctx, ni, mrec);
 		ntfs_attr_init_search_ctx(ctx, ni, mrec);
 	return ctx;
 	return ctx;

+ 1 - 1
fs/ntfs/index.c

@@ -38,7 +38,7 @@ ntfs_index_context *ntfs_index_ctx_get(ntfs_inode *idx_ni)
 {
 {
 	ntfs_index_context *ictx;
 	ntfs_index_context *ictx;
 
 
-	ictx = kmem_cache_alloc(ntfs_index_ctx_cache, SLAB_NOFS);
+	ictx = kmem_cache_alloc(ntfs_index_ctx_cache, GFP_NOFS);
 	if (ictx)
 	if (ictx)
 		*ictx = (ntfs_index_context){ .idx_ni = idx_ni };
 		*ictx = (ntfs_index_context){ .idx_ni = idx_ni };
 	return ictx;
 	return ictx;

+ 2 - 2
fs/ntfs/inode.c

@@ -324,7 +324,7 @@ struct inode *ntfs_alloc_big_inode(struct super_block *sb)
 	ntfs_inode *ni;
 	ntfs_inode *ni;
 
 
 	ntfs_debug("Entering.");
 	ntfs_debug("Entering.");
-	ni = kmem_cache_alloc(ntfs_big_inode_cache, SLAB_NOFS);
+	ni = kmem_cache_alloc(ntfs_big_inode_cache, GFP_NOFS);
 	if (likely(ni != NULL)) {
 	if (likely(ni != NULL)) {
 		ni->state = 0;
 		ni->state = 0;
 		return VFS_I(ni);
 		return VFS_I(ni);
@@ -349,7 +349,7 @@ static inline ntfs_inode *ntfs_alloc_extent_inode(void)
 	ntfs_inode *ni;
 	ntfs_inode *ni;
 
 
 	ntfs_debug("Entering.");
 	ntfs_debug("Entering.");
-	ni = kmem_cache_alloc(ntfs_inode_cache, SLAB_NOFS);
+	ni = kmem_cache_alloc(ntfs_inode_cache, GFP_NOFS);
 	if (likely(ni != NULL)) {
 	if (likely(ni != NULL)) {
 		ni->state = 0;
 		ni->state = 0;
 		return ni;
 		return ni;

+ 1 - 1
fs/ntfs/unistr.c

@@ -266,7 +266,7 @@ int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins,
 
 
 	/* We do not trust outside sources. */
 	/* We do not trust outside sources. */
 	if (likely(ins)) {
 	if (likely(ins)) {
-		ucs = kmem_cache_alloc(ntfs_name_cache, SLAB_NOFS);
+		ucs = kmem_cache_alloc(ntfs_name_cache, GFP_NOFS);
 		if (likely(ucs)) {
 		if (likely(ucs)) {
 			for (i = o = 0; i < ins_len; i += wc_len) {
 			for (i = o = 0; i < ins_len; i += wc_len) {
 				wc_len = nls->char2uni(ins + i, ins_len - i,
 				wc_len = nls->char2uni(ins + i, ins_len - i,

+ 1 - 1
fs/ocfs2/dlm/dlmfs.c

@@ -276,7 +276,7 @@ static struct inode *dlmfs_alloc_inode(struct super_block *sb)
 {
 {
 	struct dlmfs_inode_private *ip;
 	struct dlmfs_inode_private *ip;
 
 
-	ip = kmem_cache_alloc(dlmfs_inode_cache, SLAB_NOFS);
+	ip = kmem_cache_alloc(dlmfs_inode_cache, GFP_NOFS);
 	if (!ip)
 	if (!ip)
 		return NULL;
 		return NULL;
 
 

+ 1 - 1
fs/ocfs2/super.c

@@ -303,7 +303,7 @@ static struct inode *ocfs2_alloc_inode(struct super_block *sb)
 {
 {
 	struct ocfs2_inode_info *oi;
 	struct ocfs2_inode_info *oi;
 
 
-	oi = kmem_cache_alloc(ocfs2_inode_cachep, SLAB_NOFS);
+	oi = kmem_cache_alloc(ocfs2_inode_cachep, GFP_NOFS);
 	if (!oi)
 	if (!oi)
 		return NULL;
 		return NULL;
 
 

+ 0 - 1
include/linux/slab.h

@@ -19,7 +19,6 @@ typedef struct kmem_cache kmem_cache_t;
 #include	<asm/cache.h>		/* kmalloc_sizes.h needs L1_CACHE_BYTES */
 #include	<asm/cache.h>		/* kmalloc_sizes.h needs L1_CACHE_BYTES */
 
 
 /* flags for kmem_cache_alloc() */
 /* flags for kmem_cache_alloc() */
-#define	SLAB_NOFS		GFP_NOFS
 #define	SLAB_ATOMIC		GFP_ATOMIC
 #define	SLAB_ATOMIC		GFP_ATOMIC
 #define	SLAB_USER		GFP_USER
 #define	SLAB_USER		GFP_USER
 #define	SLAB_KERNEL		GFP_KERNEL
 #define	SLAB_KERNEL		GFP_KERNEL