[PATCH 2/4] xfs: combine xfs_dir_canenter into xfs_dir_createname

Christoph Hellwig hch at infradead.org
Thu Aug 28 20:00:56 CDT 2014


On Thu, Aug 21, 2014 at 07:58:43PM -0500, Eric Sandeen wrote:
> xfs_dir_canenter and xfs_dir_createname are
> almost identical.
> 
> Fold the former into the latter, with a helpful
> wrapper for the former.  If createname is called without
> an inode number, it now only checks for space, and does
> not actually add the entry.
> 
> Signed-off-by: Eric Sandeen <sandeen at redhat.com>

The code changes looks good to me, but..

>  /*
> -  Enter a name in a directory.
> + * Enter a name in a directory.
> + * If inum is 0, only test for available space.
>   */
>  int
>  xfs_dir_createname(

Given how confusing the xfs_dir_createname function name is now this
probably needs a more detailed description mentioning the checking as
first class behavior.



More information about the xfs mailing list