Re: [PATCH 2/9] gnttab: drop a redundant expression from gnttab_release_mappings()

2021-09-06 Thread Julien Grall

Hi Jan,

On 26/08/2021 11:11, Jan Beulich wrote:

This gnttab_host_mapping_get_page_type() invocation sits in the "else"
path of a conditional controlled by "map->flags & GNTMAP_readonly".

Signed-off-by: Jan Beulich 


Acked-by: Julien Grall 

Cheers,


--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -3816,9 +3816,7 @@ int gnttab_release_mappings(struct domai
  if ( gnttab_release_host_mappings(d) &&
   !is_iomem_page(act->mfn) )
  {
-if ( gnttab_host_mapping_get_page_type((map->flags &
-GNTMAP_readonly),
-   d, rd) )
+if ( gnttab_host_mapping_get_page_type(false, d, rd) )
  put_page_type(pg);
  put_page(pg);
  }



--
Julien Grall



[PATCH 2/9] gnttab: drop a redundant expression from gnttab_release_mappings()

2021-08-26 Thread Jan Beulich
This gnttab_host_mapping_get_page_type() invocation sits in the "else"
path of a conditional controlled by "map->flags & GNTMAP_readonly".

Signed-off-by: Jan Beulich 

--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -3816,9 +3816,7 @@ int gnttab_release_mappings(struct domai
 if ( gnttab_release_host_mappings(d) &&
  !is_iomem_page(act->mfn) )
 {
-if ( gnttab_host_mapping_get_page_type((map->flags &
-GNTMAP_readonly),
-   d, rd) )
+if ( gnttab_host_mapping_get_page_type(false, d, rd) )
 put_page_type(pg);
 put_page(pg);
 }