cluster: STABLE3 - gfs: Use GFP_NOFS in a few places to be safe

Steven Whitehouse swhiteho at fedoraproject.org
Mon Oct 5 14:36:38 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1d4e80d85ac546bb2e33c531d68164bb2a41b953
Commit:        1d4e80d85ac546bb2e33c531d68164bb2a41b953
Parent:        69408051c88e056ebe8b224c00a5a17fe4a5a924
Author:        Steven Whitehouse <swhiteho at redhat.com>
AuthorDate:    Wed Jul 29 17:02:14 2009 +0100
Committer:     Steven Whitehouse <swhiteho at redhat.com>
CommitterDate: Mon Oct 5 16:31:26 2009 +0100

gfs: Use GFP_NOFS in a few places to be safe

Just a few updates to avoid any problems resulting from memory
allocation during transactions.

Signed-off-by: Steven Whitehouse <swhiteho at redhat.com>
---
 gfs-kernel/src/gfs/acl.c   |    8 ++++----
 gfs-kernel/src/gfs/eattr.c |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gfs-kernel/src/gfs/acl.c b/gfs-kernel/src/gfs/acl.c
index 3936baa..3e9d358 100644
--- a/gfs-kernel/src/gfs/acl.c
+++ b/gfs-kernel/src/gfs/acl.c
@@ -127,7 +127,7 @@ gfs_acl_get(struct gfs_inode *ip, int access, struct posix_acl **acl)
 	if (!GFS_EA_DATA_LEN(el.el_ea))
 		goto out;
 
-	er.er_data = kmalloc(GFS_EA_DATA_LEN(el.el_ea), GFP_KERNEL);
+	er.er_data = kmalloc(GFS_EA_DATA_LEN(el.el_ea), GFP_NOFS);
 	error = -ENOMEM;
 	if (!er.er_data)
 		goto out;
@@ -214,7 +214,7 @@ gfs_acl_new_prep(struct gfs_inode *dip,
 	}
 
 	{
-		struct posix_acl *clone = posix_acl_clone(acl, GFP_KERNEL);
+		struct posix_acl *clone = posix_acl_clone(acl, GFP_NOFS);
 		error = -ENOMEM;
 		if (!clone)
 			goto out;
@@ -250,7 +250,7 @@ gfs_acl_new_prep(struct gfs_inode *dip,
 			b *= 2;
 		b++;
 
-		d = kmalloc(s, GFP_KERNEL);
+		d = kmalloc(s, GFP_NOFS);
 		error = -ENOMEM;
 		if (!d)
 			goto out;
@@ -355,7 +355,7 @@ gfs_acl_chmod(struct gfs_inode *ip, struct iattr *attr)
 	if (!GFS_EA_DATA_LEN(el.el_ea))
 		goto simple;
 
-	er.er_data = kmalloc(GFS_EA_DATA_LEN(el.el_ea), GFP_KERNEL);
+	er.er_data = kmalloc(GFS_EA_DATA_LEN(el.el_ea), GFP_NOFS);
 	error = -ENOMEM;
 	if (!er.er_data)
 		goto out;
diff --git a/gfs-kernel/src/gfs/eattr.c b/gfs-kernel/src/gfs/eattr.c
index 062b682..0558300 100644
--- a/gfs-kernel/src/gfs/eattr.c
+++ b/gfs-kernel/src/gfs/eattr.c
@@ -596,7 +596,7 @@ ea_get_unstuffed(struct gfs_inode *ip, struct gfs_ea_header *ea,
 	unsigned int x;
 	int error = 0;
 
-	bh = kmalloc(nptrs * sizeof(struct buffer_head *), GFP_KERNEL);
+	bh = kmalloc(nptrs * sizeof(struct buffer_head *), GFP_NOFS);
 	if (!bh)
 		return -ENOMEM;
 
@@ -1621,7 +1621,7 @@ ea_acl_chmod_unstuffed(struct gfs_inode *ip,
 	unsigned int x;
 	int error;
 
-	bh = kmalloc(nptrs * sizeof(struct buffer_head *), GFP_KERNEL);
+	bh = kmalloc(nptrs * sizeof(struct buffer_head *), GFP_NOFS);
 	if (!bh)
 		return -ENOMEM;
 


More information about the cluster-commits mailing list