Blob Blame History Raw
From: Miklos Szeredi <mszeredi@redhat.com>
Date: Tue, 10 Sep 2019 15:04:08 +0200
Subject: fuse: rearrange and resize fuse_args fields
Git-commit: 1f4e9d03d1fbff428a0e864d5456e0a2dace6f81
Patch-mainline: v5.4-rc1
References: jsc#SLE-13782

This makes the structure better packed.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Acked-by: Luis Henriques <lhenriques@suse.com>
---
 fs/fuse/fuse_i.h | 8 ++++----
 fs/fuse/xattr.c  | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 835c0671320c..a89362ee46d9 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -287,12 +287,12 @@ struct fuse_page_desc {
 };
 
 struct fuse_args {
-	uint32_t opcode;
 	uint64_t nodeid;
-	unsigned int in_numargs;
+	uint32_t opcode;
+	unsigned short in_numargs;
+	unsigned short out_numargs;
+	bool out_argvar:1;
 	struct fuse_in_arg in_args[3];
-	unsigned int out_argvar:1;
-	unsigned int out_numargs;
 	struct fuse_arg out_args[2];
 };
 
diff --git a/fs/fuse/xattr.c b/fs/fuse/xattr.c
index 2e02486e46e6..20d052e08b3b 100644
--- a/fs/fuse/xattr.c
+++ b/fs/fuse/xattr.c
@@ -70,7 +70,7 @@ ssize_t fuse_getxattr(struct inode *inode, const char *name, void *value,
 	/* This is really two different operations rolled into one */
 	args.out_numargs = 1;
 	if (size) {
-		args.out_argvar = 1;
+		args.out_argvar = true;
 		args.out_args[0].size = size;
 		args.out_args[0].value = value;
 	} else {
@@ -129,7 +129,7 @@ ssize_t fuse_listxattr(struct dentry *entry, char *list, size_t size)
 	/* This is really two different operations rolled into one */
 	args.out_numargs = 1;
 	if (size) {
-		args.out_argvar = 1;
+		args.out_argvar = true;
 		args.out_args[0].size = size;
 		args.out_args[0].value = list;
 	} else {