Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1740993 > unrolled thread
| Started by | Jens Axboe <axboe@kernel.dk> |
|---|---|
| First post | 2017-09-27 22:20 +0200 |
| Last post | 2017-09-28 20:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases Jens Axboe <axboe@kernel.dk> - 2017-09-27 22:20 +0200
Re: [PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases Nikolay Borisov <nborisov@suse.com> - 2017-09-28 17:30 +0200
Re: [PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases Jens Axboe <axboe@kernel.dk> - 2017-09-28 20:20 +0200
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Date | 2017-09-27 22:20 +0200 |
| Subject | [PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases |
| Message-ID | <uuqYi-7LT-7@gated-at.bofh.it> |
We currently it it for find_or_create_page(), which means that it cannot fail. Ensure we also pass in 'retry == true' to alloc_page_buffers(), which also ensure that it cannot fail. After this, there are no failure cases in grow_dev_page() that occur because of a failed memory allocation. Signed-off-by: Jens Axboe <axboe@kernel.dk> --- fs/buffer.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 1234ae343aef..3b60cd8456db 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -988,8 +988,6 @@ grow_dev_page(struct block_device *bdev, sector_t block, gfp_mask |= __GFP_NOFAIL; page = find_or_create_page(inode->i_mapping, index, gfp_mask); - if (!page) - return ret; BUG_ON(!PageLocked(page)); @@ -1008,9 +1006,7 @@ grow_dev_page(struct block_device *bdev, sector_t block, /* * Allocate some buffers for this page */ - bh = alloc_page_buffers(page, size, false); - if (!bh) - goto failed; + bh = alloc_page_buffers(page, size, true); /* * Link the page to the buffers and initialise them. Take the -- 2.7.4
[toc] | [next] | [standalone]
| From | Nikolay Borisov <nborisov@suse.com> |
|---|---|
| Date | 2017-09-28 17:30 +0200 |
| Subject | Re: [PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases |
| Message-ID | <uuIVc-2ep-25@gated-at.bofh.it> |
| In reply to | #1740993 |
On 27.09.2017 23:13, Jens Axboe wrote: > We currently it it for find_or_create_page(), which means that it nit: Perhaps you wanted to write "We currently use it for find_..." otherwise: Reviewed-by: Nikolay Borisov <nborisov@suse.com> > cannot fail. Ensure we also pass in 'retry == true' to > alloc_page_buffers(), which also ensure that it cannot fail. > > After this, there are no failure cases in grow_dev_page() that > occur because of a failed memory allocation. > > Signed-off-by: Jens Axboe <axboe@kernel.dk> > --- > fs/buffer.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/fs/buffer.c b/fs/buffer.c > index 1234ae343aef..3b60cd8456db 100644 > --- a/fs/buffer.c > +++ b/fs/buffer.c > @@ -988,8 +988,6 @@ grow_dev_page(struct block_device *bdev, sector_t block, > gfp_mask |= __GFP_NOFAIL; > > page = find_or_create_page(inode->i_mapping, index, gfp_mask); > - if (!page) > - return ret; > > BUG_ON(!PageLocked(page)); > > @@ -1008,9 +1006,7 @@ grow_dev_page(struct block_device *bdev, sector_t block, > /* > * Allocate some buffers for this page > */ > - bh = alloc_page_buffers(page, size, false); > - if (!bh) > - goto failed; > + bh = alloc_page_buffers(page, size, true); > > /* > * Link the page to the buffers and initialise them. Take the >
[toc] | [prev] | [next] | [standalone]
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Date | 2017-09-28 20:20 +0200 |
| Subject | Re: [PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases |
| Message-ID | <uuLzI-3VY-15@gated-at.bofh.it> |
| In reply to | #1741633 |
On 09/28/2017 04:11 PM, Nikolay Borisov wrote: > > > On 27.09.2017 23:13, Jens Axboe wrote: >> We currently it it for find_or_create_page(), which means that it > > nit: Perhaps you wanted to write "We currently use it for find_..." > > otherwise: > > Reviewed-by: Nikolay Borisov <nborisov@suse.com> Yeah, fixed up, thanks. -- Jens Axboe
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web