Re: [PATCH 13/16] xfs: move common code into xfs_dir2_sf_addname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 30, 2024 at 02:49:23PM +0200, Christoph Hellwig wrote:
> Move updating the inode size and the call to xfs_dir2_sf_check from
> xfs_dir2_sf_addname_easy and xfs_dir2_sf_addname_hard into
> xfs_dir2_sf_addname.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

This seems simple enough,
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/libxfs/xfs_dir2_sf.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_dir2_sf.c b/fs/xfs/libxfs/xfs_dir2_sf.c
> index 43e1090082b45d..a9d614dfb9e43b 100644
> --- a/fs/xfs/libxfs/xfs_dir2_sf.c
> +++ b/fs/xfs/libxfs/xfs_dir2_sf.c
> @@ -465,6 +465,9 @@ xfs_dir2_sf_addname(
>  			xfs_dir2_sf_toino8(args);
>  		xfs_dir2_sf_addname_hard(args, objchange, new_isize);
>  	}
> +
> +	dp->i_disk_size = new_isize;
> +	xfs_dir2_sf_check(args);
>  	xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_DDATA);
>  	return 0;
>  }
> @@ -498,8 +501,6 @@ xfs_dir2_sf_addname_easy(
>  	 */
>  	sfep = (xfs_dir2_sf_entry_t *)((char *)sfp + byteoff);
>  	xfs_dir2_sf_addname_common(args, sfep, offset, false);
> -	dp->i_disk_size = new_isize;
> -	xfs_dir2_sf_check(args);
>  }
>  
>  /*
> @@ -583,8 +584,6 @@ xfs_dir2_sf_addname_hard(
>  		memcpy(sfep, oldsfep, old_isize - nbytes);
>  	}
>  	kfree(buf);
> -	dp->i_disk_size = new_isize;
> -	xfs_dir2_sf_check(args);
>  }
>  
>  /*
> -- 
> 2.39.2
> 
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux