From: Christoph Hellwig Date: Mon, 24 Feb 2025 18:21:56 +0000 (-0800) Subject: xfs: mark xfs_dir_isempty static X-Git-Tag: v6.14.0~92 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4d11913a16e49538397bb576394ae24bf55140d;p=thirdparty%2Fxfsprogs-dev.git xfs: mark xfs_dir_isempty static Source kernel commit: 23ebf63925989adbe4c4277c8e9b04e0a37f6005 And return bool instead of a boolean condition as int. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino --- diff --git a/libxfs/xfs_dir2.c b/libxfs/xfs_dir2.c index 0b026d5f..29e64603 100644 --- a/libxfs/xfs_dir2.c +++ b/libxfs/xfs_dir2.c @@ -196,7 +196,7 @@ xfs_da_unmount( /* * Return 1 if directory contains only "." and "..". */ -int +static bool xfs_dir_isempty( xfs_inode_t *dp) { @@ -204,9 +204,9 @@ xfs_dir_isempty( ASSERT(S_ISDIR(VFS_I(dp)->i_mode)); if (dp->i_disk_size == 0) /* might happen during shutdown. */ - return 1; + return true; if (dp->i_disk_size > xfs_inode_data_fork_size(dp)) - return 0; + return false; sfp = dp->i_df.if_data; return !sfp->count; } diff --git a/libxfs/xfs_dir2.h b/libxfs/xfs_dir2.h index 576068ed..a6594a5a 100644 --- a/libxfs/xfs_dir2.h +++ b/libxfs/xfs_dir2.h @@ -58,7 +58,6 @@ extern void xfs_dir_startup(void); extern int xfs_da_mount(struct xfs_mount *mp); extern void xfs_da_unmount(struct xfs_mount *mp); -extern int xfs_dir_isempty(struct xfs_inode *dp); extern int xfs_dir_init(struct xfs_trans *tp, struct xfs_inode *dp, struct xfs_inode *pdp); extern int xfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp,