Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285867
b: refs/heads/master
c: 74a6eeb
h: refs/heads/master
i:
  285865: 17053d1
  285863: 73eea20
v: v3
  • Loading branch information
Peng Tao authored and Trond Myklebust committed Jan 12, 2012
1 parent 2b99a96 commit 42deb13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93a3844ee0f843b05a1df4b52e1a19ff26b98d24
refs/heads/master: 74a6eeb44ca6174d9cc93b9b8b4d58211c57bc80
17 changes: 11 additions & 6 deletions trunk/fs/nfs/blocklayout/blocklayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,19 @@ static struct bio *bl_alloc_init_bio(int npg, sector_t isect,
{
struct bio *bio;

npg = min(npg, BIO_MAX_PAGES);
bio = bio_alloc(GFP_NOIO, npg);
if (!bio)
return NULL;
if (!bio && (current->flags & PF_MEMALLOC)) {
while (!bio && (npg /= 2))
bio = bio_alloc(GFP_NOIO, npg);
}

bio->bi_sector = isect - be->be_f_offset + be->be_v_offset;
bio->bi_bdev = be->be_mdev;
bio->bi_end_io = end_io;
bio->bi_private = par;
if (bio) {
bio->bi_sector = isect - be->be_f_offset + be->be_v_offset;
bio->bi_bdev = be->be_mdev;
bio->bi_end_io = end_io;
bio->bi_private = par;
}
return bio;
}

Expand Down

0 comments on commit 42deb13

Please sign in to comment.