files: Reorder fdinfo_list_entry fields

Submitted by Kirill Tkhai on Aug. 3, 2017, 2:14 p.m.

Details

Message ID 150176965690.28996.6943860721066643351.stgit@localhost.localdomain
State Accepted
Series "files: Reorder fdinfo_list_entry fields"
Commit 476388196ef23b74dbc79345d7c8aa63881b2be5
Headers show

Commit Message

Kirill Tkhai Aug. 3, 2017, 2:14 p.m.
Keep int pid with short-len fields to avoid
alignment gaps in structure.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 criu/include/files.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/include/files.h b/criu/include/files.h
index 718677a7e..e1f5da62f 100644
--- a/criu/include/files.h
+++ b/criu/include/files.h
@@ -85,8 +85,8 @@  struct fdinfo_list_entry {
 	struct file_desc	*desc;		/* Associated file descriptor */
 	struct list_head	ps_list;	/* To chain  per-task files */
 	struct pstree_item	*task;
-	int			pid;
 	FdinfoEntry		*fe;
+	int			pid;
 	u8			received:1;
 	u8			stage:3;
 	u8			fake:1;

Comments

Andrey Vagin Aug. 8, 2017, 1:21 a.m.
Applied
On Thu, Aug 03, 2017 at 05:14:30PM +0300, Kirill Tkhai wrote:
> Keep int pid with short-len fields to avoid
> alignment gaps in structure.
> 
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>  criu/include/files.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/criu/include/files.h b/criu/include/files.h
> index 718677a7e..e1f5da62f 100644
> --- a/criu/include/files.h
> +++ b/criu/include/files.h
> @@ -85,8 +85,8 @@ struct fdinfo_list_entry {
>  	struct file_desc	*desc;		/* Associated file descriptor */
>  	struct list_head	ps_list;	/* To chain  per-task files */
>  	struct pstree_item	*task;
> -	int			pid;
>  	FdinfoEntry		*fe;
> +	int			pid;
>  	u8			received:1;
>  	u8			stage:3;
>  	u8			fake:1;
>