diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-27 14:29:00 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-27 14:29:00 -0400 |
commit | dd894be8df11ea40a1163b75596ab85d558816c8 (patch) | |
tree | 3d40979d6139a0f402481afb0f4b52506eb6d05d /fs/gfs2/rgrp.c | |
parent | f45b7ddd2bae1dc98e35c3611b55cba6d2a8da9e (diff) |
[GFS2] Change some allocations to GFP_NOFS
Some allocations in rgrp.c should have been GFP_NOFS
rather than GFP_KERNEL.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r-- | fs/gfs2/rgrp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 65eea0b88bf7..4e0357dc838b 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -374,7 +374,7 @@ static int compute_bitstructs(struct gfs2_rgrpd *rgd) | |||
374 | if (!length) | 374 | if (!length) |
375 | return -EINVAL; | 375 | return -EINVAL; |
376 | 376 | ||
377 | rgd->rd_bits = kcalloc(length, sizeof(struct gfs2_bitmap), GFP_KERNEL); | 377 | rgd->rd_bits = kcalloc(length, sizeof(struct gfs2_bitmap), GFP_NOFS); |
378 | if (!rgd->rd_bits) | 378 | if (!rgd->rd_bits) |
379 | return -ENOMEM; | 379 | return -ENOMEM; |
380 | 380 | ||
@@ -467,7 +467,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip) | |||
467 | goto fail; | 467 | goto fail; |
468 | } | 468 | } |
469 | 469 | ||
470 | rgd = kzalloc(sizeof(struct gfs2_rgrpd), GFP_KERNEL); | 470 | rgd = kzalloc(sizeof(struct gfs2_rgrpd), GFP_NOFS); |
471 | error = -ENOMEM; | 471 | error = -ENOMEM; |
472 | if (!rgd) | 472 | if (!rgd) |
473 | goto fail; | 473 | goto fail; |
@@ -1184,14 +1184,13 @@ static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, uint64_t bstart, | |||
1184 | 1184 | ||
1185 | if (!bi->bi_clone) { | 1185 | if (!bi->bi_clone) { |
1186 | bi->bi_clone = kmalloc(bi->bi_bh->b_size, | 1186 | bi->bi_clone = kmalloc(bi->bi_bh->b_size, |
1187 | GFP_KERNEL | __GFP_NOFAIL); | 1187 | GFP_NOFS | __GFP_NOFAIL); |
1188 | memcpy(bi->bi_clone + bi->bi_offset, | 1188 | memcpy(bi->bi_clone + bi->bi_offset, |
1189 | bi->bi_bh->b_data + bi->bi_offset, | 1189 | bi->bi_bh->b_data + bi->bi_offset, |
1190 | bi->bi_len); | 1190 | bi->bi_len); |
1191 | } | 1191 | } |
1192 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); | 1192 | gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); |
1193 | gfs2_setbit(rgd, | 1193 | gfs2_setbit(rgd, bi->bi_bh->b_data + bi->bi_offset, |
1194 | bi->bi_bh->b_data + bi->bi_offset, | ||
1195 | bi->bi_len, buf_blk, new_state); | 1194 | bi->bi_len, buf_blk, new_state); |
1196 | } | 1195 | } |
1197 | 1196 | ||
@@ -1469,7 +1468,7 @@ void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist, | |||
1469 | new_space = rlist->rl_space + 10; | 1468 | new_space = rlist->rl_space + 10; |
1470 | 1469 | ||
1471 | tmp = kcalloc(new_space, sizeof(struct gfs2_rgrpd *), | 1470 | tmp = kcalloc(new_space, sizeof(struct gfs2_rgrpd *), |
1472 | GFP_KERNEL | __GFP_NOFAIL); | 1471 | GFP_NOFS | __GFP_NOFAIL); |
1473 | 1472 | ||
1474 | if (rlist->rl_rgd) { | 1473 | if (rlist->rl_rgd) { |
1475 | memcpy(tmp, rlist->rl_rgd, | 1474 | memcpy(tmp, rlist->rl_rgd, |
@@ -1501,7 +1500,7 @@ void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state, | |||
1501 | unsigned int x; | 1500 | unsigned int x; |
1502 | 1501 | ||
1503 | rlist->rl_ghs = kcalloc(rlist->rl_rgrps, sizeof(struct gfs2_holder), | 1502 | rlist->rl_ghs = kcalloc(rlist->rl_rgrps, sizeof(struct gfs2_holder), |
1504 | GFP_KERNEL | __GFP_NOFAIL); | 1503 | GFP_NOFS | __GFP_NOFAIL); |
1505 | for (x = 0; x < rlist->rl_rgrps; x++) | 1504 | for (x = 0; x < rlist->rl_rgrps; x++) |
1506 | gfs2_holder_init(rlist->rl_rgd[x]->rd_gl, | 1505 | gfs2_holder_init(rlist->rl_rgd[x]->rd_gl, |
1507 | state, flags, | 1506 | state, flags, |