diff mbox series

[1/2] fat: remove i_version handling from fat_update_time

Message ID 20230810-ctime-fat-v1-1-327598fd1de8@kernel.org (mailing list archive)
State New, archived
Headers show
Series fat: revise the FAT patches for mgtime series | expand

Commit Message

Jeff Layton Aug. 10, 2023, 1:12 p.m. UTC
commit 6bb885ecd746 (fat: add functions to update and truncate
timestamps appropriately") added an update_time routine for fat. That
patch added a section for handling the S_VERSION bit, even though FAT
doesn't enable SB_I_VERSION and the S_VERSION bit will never be set when
calling it.

Remove the section for handling S_VERSION since it's effectively dead
code, and will be problematic vs. future changes.

Cc: Frank Sorenson <sorenson@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/fat/misc.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jan Kara Aug. 10, 2023, 1:21 p.m. UTC | #1
On Thu 10-08-23 09:12:04, Jeff Layton wrote:
> commit 6bb885ecd746 (fat: add functions to update and truncate
> timestamps appropriately") added an update_time routine for fat. That
> patch added a section for handling the S_VERSION bit, even though FAT
> doesn't enable SB_I_VERSION and the S_VERSION bit will never be set when
> calling it.
> 
> Remove the section for handling S_VERSION since it's effectively dead
> code, and will be problematic vs. future changes.
> 
> Cc: Frank Sorenson <sorenson@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>

Looks good. Feel free to add:

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

								Honza

> ---
>  fs/fat/misc.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/fat/misc.c b/fs/fat/misc.c
> index ab28173348fa..37f4afb346af 100644
> --- a/fs/fat/misc.c
> +++ b/fs/fat/misc.c
> @@ -354,9 +354,6 @@ int fat_update_time(struct inode *inode, int flags)
>  			dirty_flags |= I_DIRTY_SYNC;
>  	}
>  
> -	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
> -		dirty_flags |= I_DIRTY_SYNC;
> -
>  	__mark_inode_dirty(inode, dirty_flags);
>  	return 0;
>  }
> 
> -- 
> 2.41.0
>
OGAWA Hirofumi Aug. 10, 2023, 5:31 p.m. UTC | #2
Jeff Layton <jlayton@kernel.org> writes:

> commit 6bb885ecd746 (fat: add functions to update and truncate
> timestamps appropriately") added an update_time routine for fat. That
> patch added a section for handling the S_VERSION bit, even though FAT
> doesn't enable SB_I_VERSION and the S_VERSION bit will never be set when
> calling it.
>
> Remove the section for handling S_VERSION since it's effectively dead
> code, and will be problematic vs. future changes.
>
> Cc: Frank Sorenson <sorenson@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>

Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

Thanks.

> ---
>  fs/fat/misc.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/fs/fat/misc.c b/fs/fat/misc.c
> index ab28173348fa..37f4afb346af 100644
> --- a/fs/fat/misc.c
> +++ b/fs/fat/misc.c
> @@ -354,9 +354,6 @@ int fat_update_time(struct inode *inode, int flags)
>  			dirty_flags |= I_DIRTY_SYNC;
>  	}
>  
> -	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
> -		dirty_flags |= I_DIRTY_SYNC;
> -
>  	__mark_inode_dirty(inode, dirty_flags);
>  	return 0;
>  }
Frank Sorenson Aug. 10, 2023, 6:04 p.m. UTC | #3
On 8/10/23 08:12, Jeff Layton wrote:
> commit 6bb885ecd746 (fat: add functions to update and truncate
> timestamps appropriately") added an update_time routine for fat. That
> patch added a section for handling the S_VERSION bit, even though FAT
> doesn't enable SB_I_VERSION and the S_VERSION bit will never be set when
> calling it.
>
> Remove the section for handling S_VERSION since it's effectively dead
> code, and will be problematic vs. future changes.
>
> Cc: Frank Sorenson <sorenson@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---

Reviewed-by: Frank Sorenson <sorenson@redhat.com>

>   fs/fat/misc.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/fs/fat/misc.c b/fs/fat/misc.c
> index ab28173348fa..37f4afb346af 100644
> --- a/fs/fat/misc.c
> +++ b/fs/fat/misc.c
> @@ -354,9 +354,6 @@ int fat_update_time(struct inode *inode, int flags)
>   			dirty_flags |= I_DIRTY_SYNC;
>   	}
>   
> -	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
> -		dirty_flags |= I_DIRTY_SYNC;
> -
>   	__mark_inode_dirty(inode, dirty_flags);
>   	return 0;
>   }
>
diff mbox series

Patch

diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index ab28173348fa..37f4afb346af 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -354,9 +354,6 @@  int fat_update_time(struct inode *inode, int flags)
 			dirty_flags |= I_DIRTY_SYNC;
 	}
 
-	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
-		dirty_flags |= I_DIRTY_SYNC;
-
 	__mark_inode_dirty(inode, dirty_flags);
 	return 0;
 }