Browse Source

ocfs2: Force use of GFP_NOFS in ocfs2_write()

We can otherwise recurse into the file system.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Mark Fasheh 18 years ago
parent
commit
9315f130e1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fs/ocfs2/aops.c

+ 1 - 1
fs/ocfs2/aops.c

@@ -1087,7 +1087,7 @@ static ssize_t ocfs2_write(struct file *file, u32 phys, handle_t *handle,
 	for(i = 0; i < numpages; i++) {
 	for(i = 0; i < numpages; i++) {
 		index = start + i;
 		index = start + i;
 
 
-		cpages[i] = grab_cache_page(mapping, index);
+		cpages[i] = find_or_create_page(mapping, index, GFP_NOFS);
 		if (!cpages[i]) {
 		if (!cpages[i]) {
 			ret = -ENOMEM;
 			ret = -ENOMEM;
 			mlog_errno(ret);
 			mlog_errno(ret);