From 01a4d0468e4c5fab570c7cd8ec2543901b2601e7 Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Tue, 20 Jul 2010 19:45:03 -0700 Subject: [PATCH] --- yaml --- r: 201823 b: refs/heads/master c: 4244b52e18be959ced77b984f268e46a0a7654e3 h: refs/heads/master i: 201821: 1b9c694bf83df47ea718ef1cc0d7b2237fbb494f 201819: f3929a40b263394fa32f6764de681c033b1bbea0 201815: 38158b5a0433a8ee04cfd0f99a4b307b66fea1f8 201807: 61db42715325b37a6908d7dd2e05580c7e8e229e 201791: 62b34b72cab982c8c59f52b228585e486c7e0547 v: v3 --- [refs] | 2 +- trunk/fs/gfs2/dir.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 327bc54221bc..ebeb0ad74a3a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 461cb419f074aab16836a660efb8e855b6c1609c +refs/heads/master: 4244b52e18be959ced77b984f268e46a0a7654e3 diff --git a/trunk/fs/gfs2/dir.c b/trunk/fs/gfs2/dir.c index 6b48d7c268b2..b9dd88a78dd4 100644 --- a/trunk/fs/gfs2/dir.c +++ b/trunk/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,