diff mbox

linux-gen: _ishm: fix normal page fallback

Message ID 1484903943-1876-1-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard Jan. 20, 2017, 9:19 a.m. UTC
Fixing failure due to lack of huge pages.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

---
 platform/linux-generic/_ishm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

Comments

Bill Fischofer Jan. 21, 2017, 10:29 p.m. UTC | #1
This appears to be a bug fix. Bug fix patches should reference the bug
being resolved in the commit log. I'm not sure I see this in bugzilla,
so one should be opened for this.

On Fri, Jan 20, 2017 at 3:19 AM, Christophe Milard
<christophe.milard@linaro.org> wrote:
> Fixing failure due to lack of huge pages.

>

> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>


Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

> ---

>  platform/linux-generic/_ishm.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

>

> diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c

> index f889834..3797f20 100644

> --- a/platform/linux-generic/_ishm.c

> +++ b/platform/linux-generic/_ishm.c

> @@ -547,7 +547,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align,

>                 addr = alloc_fragment(len, block_index, align, &fragment);

>                 if (!addr) {

>                         ODP_ERR("alloc_fragment failed.\n");

> -                       if (new_block->filename[0]) {

> +                       if (!new_block->external_fd) {

>                                 close(*fd);

>                                 *fd = -1;

>                                 delete_file(new_block);

> @@ -562,7 +562,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align,

>         if (mapped_addr == NULL) {

>                 if (flags & _ODP_ISHM_SINGLE_VA)

>                         free_fragment(fragment);

> -               if (new_block->filename[0]) {

> +               if (!new_block->external_fd) {

>                         close(*fd);

>                         *fd = -1;

>                         delete_file(new_block);

> --

> 2.7.4

>
Christophe Milard Jan. 23, 2017, 6:58 a.m. UTC | #2
Shall I open a bug and mark it resolved immediately?

On 21 January 2017 at 23:29, Bill Fischofer <bill.fischofer@linaro.org> wrote:
> This appears to be a bug fix. Bug fix patches should reference the bug

> being resolved in the commit log. I'm not sure I see this in bugzilla,

> so one should be opened for this.

>

> On Fri, Jan 20, 2017 at 3:19 AM, Christophe Milard

> <christophe.milard@linaro.org> wrote:

>> Fixing failure due to lack of huge pages.

>>

>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>

> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

>

>> ---

>>  platform/linux-generic/_ishm.c | 4 ++--

>>  1 file changed, 2 insertions(+), 2 deletions(-)

>>

>> diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c

>> index f889834..3797f20 100644

>> --- a/platform/linux-generic/_ishm.c

>> +++ b/platform/linux-generic/_ishm.c

>> @@ -547,7 +547,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align,

>>                 addr = alloc_fragment(len, block_index, align, &fragment);

>>                 if (!addr) {

>>                         ODP_ERR("alloc_fragment failed.\n");

>> -                       if (new_block->filename[0]) {

>> +                       if (!new_block->external_fd) {

>>                                 close(*fd);

>>                                 *fd = -1;

>>                                 delete_file(new_block);

>> @@ -562,7 +562,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align,

>>         if (mapped_addr == NULL) {

>>                 if (flags & _ODP_ISHM_SINGLE_VA)

>>                         free_fragment(fragment);

>> -               if (new_block->filename[0]) {

>> +               if (!new_block->external_fd) {

>>                         close(*fd);

>>                         *fd = -1;

>>                         delete_file(new_block);

>> --

>> 2.7.4

>>
diff mbox

Patch

diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c
index f889834..3797f20 100644
--- a/platform/linux-generic/_ishm.c
+++ b/platform/linux-generic/_ishm.c
@@ -547,7 +547,7 @@  static void *do_map(int block_index, uint64_t len, uint32_t align,
 		addr = alloc_fragment(len, block_index, align, &fragment);
 		if (!addr) {
 			ODP_ERR("alloc_fragment failed.\n");
-			if (new_block->filename[0]) {
+			if (!new_block->external_fd) {
 				close(*fd);
 				*fd = -1;
 				delete_file(new_block);
@@ -562,7 +562,7 @@  static void *do_map(int block_index, uint64_t len, uint32_t align,
 	if (mapped_addr == NULL) {
 		if (flags & _ODP_ISHM_SINGLE_VA)
 			free_fragment(fragment);
-		if (new_block->filename[0]) {
+		if (!new_block->external_fd) {
 			close(*fd);
 			*fd = -1;
 			delete_file(new_block);