Re: [PATCH 07/13] xfs: refactor incore dquot initialization functions

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

 



On 4/23/18 11:27 AM, Christoph Hellwig wrote:
> On Sun, Apr 22, 2018 at 08:06:37AM -0700, Darrick J. Wong wrote:
>> -/*
>> - * Read in the ondisk dquot using dqtobp() then copy it to an incore version,
>> - * and release the buffer immediately.
>> - *
>> - * If XFS_QMOPT_DQALLOC is set, allocate a dquot on disk if it needed.
>> - */
>> -int
>> -xfs_qm_dqread(
>> +/* Allocate and initialize everything we need for an incore dquot. */
>> +STATIC struct xfs_dquot *
>> +xfs_qm_dqinit_once(
>>  	struct xfs_mount	*mp,
>>  	xfs_dqid_t		id,
>> -	uint			type,
>> -	uint			flags,
>> -	struct xfs_dquot	**O_dqpp)
>> +	uint			type)
>>  {
>>  	struct xfs_dquot	*dqp;
>> -	struct xfs_disk_dquot	*ddqp;
>> -	struct xfs_buf		*bp;
>> -	struct xfs_trans	*tp = NULL;
>> -	int			error;
>>  
>>  	dqp = kmem_zone_zalloc(xfs_qm_dqzone, KM_SLEEP);
> 
> Shouldn't this be called something like xfs_dquot_alloc given that
> it allocates the xfs_dquot structure?

Preaching to the choir here but I agree, "init_once" has a pretty specific
meaning in slab allocation paths, and this isn't it. ;)

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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