aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-03 14:40:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-03 14:40:10 -0700
commit3a09b1be53d23df780a0cd0e4087a05e2ca4a00c (patch)
tree16c4ee5593847cc96e44e95f94e3ca0e315dfb1d /fs/gfs2/dir.c
parent7046e668d7973c470146fbe6635967a1b4a31bca (diff)
parent0809f6ec18bbce54c996f5c36f4b9d371075c98b (diff)
downloadkernel_samsung_smdk4412-3a09b1be53d23df780a0cd0e4087a05e2ca4a00c.zip
kernel_samsung_smdk4412-3a09b1be53d23df780a0cd0e4087a05e2ca4a00c.tar.gz
kernel_samsung_smdk4412-3a09b1be53d23df780a0cd0e4087a05e2ca4a00c.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: GFS2: Fix recovery stuck bug (try #2) GFS2: Fix typo in stuffed file data copy handling Revert "GFS2: recovery stuck on transaction lock" GFS2: Make "try" lock not try quite so hard GFS2: remove dependency on __GFP_NOFAIL GFS2: Simplify gfs2_write_alloc_required GFS2: Wait for journal id on mount if not specified on mount command line GFS2: Use nobh_writepage
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r--fs/gfs2/dir.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 6b48d7c..b9dd88a 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -955,7 +955,12 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name)
/* Change the pointers.
Don't bother distinguishing stuffed from non-stuffed.
This code is complicated enough already. */
- lp = kmalloc(half_len * sizeof(__be64), GFP_NOFS | __GFP_NOFAIL);
+ lp = kmalloc(half_len * sizeof(__be64), GFP_NOFS);
+ if (!lp) {
+ error = -ENOMEM;
+ goto fail_brelse;
+ }
+
/* Change the pointers */
for (x = 0; x < half_len; x++)
lp[x] = cpu_to_be64(bn);
@@ -1063,7 +1068,9 @@ static int dir_double_exhash(struct gfs2_inode *dip)
/* Allocate both the "from" and "to" buffers in one big chunk */
- buf = kcalloc(3, sdp->sd_hash_bsize, GFP_NOFS | __GFP_NOFAIL);
+ buf = kcalloc(3, sdp->sd_hash_bsize, GFP_NOFS);
+ if (!buf)
+ return -ENOMEM;
for (block = dip->i_disksize >> sdp->sd_hash_bsize_shift; block--;) {
error = gfs2_dir_read_data(dip, (char *)buf,