diff mbox series

[v3,6/6] inode: make i_state a u32

Message ID 20240823-work-i_state-v3-6-5cd5fd207a57@kernel.org (mailing list archive)
State New
Headers show
Series inode: turn i_state into u32 | expand

Commit Message

Christian Brauner Aug. 23, 2024, 12:47 p.m. UTC
Now that we use the wait var event mechanism make i_state a u32 and free
up 4 bytes. This means we currently have two 4 byte holes in struct
inode which we can pack.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 include/linux/fs.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jan Kara Sept. 9, 2024, 7:35 a.m. UTC | #1
On Fri 23-08-24 14:47:40, Christian Brauner wrote:
> Now that we use the wait var event mechanism make i_state a u32 and free
> up 4 bytes. This means we currently have two 4 byte holes in struct
> inode which we can pack.
> 
> Signed-off-by: Christian Brauner <brauner@kernel.org>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  include/linux/fs.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index f257f8fad7d0..746ac60cef92 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -681,7 +681,8 @@ struct inode {
>  #endif
>  
>  	/* Misc */
> -	unsigned long		i_state;
> +	u32			i_state;
> +	/* 32-bit hole */
>  	struct rw_semaphore	i_rwsem;
>  
>  	unsigned long		dirtied_when;	/* jiffies of first dirtying */
> 
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/include/linux/fs.h b/include/linux/fs.h
index f257f8fad7d0..746ac60cef92 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -681,7 +681,8 @@  struct inode {
 #endif
 
 	/* Misc */
-	unsigned long		i_state;
+	u32			i_state;
+	/* 32-bit hole */
 	struct rw_semaphore	i_rwsem;
 
 	unsigned long		dirtied_when;	/* jiffies of first dirtying */