Re: [PATCH 2/4] xfs: Add pquota fields where gquota is used

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

 



On 07/17/2012 03:36 PM, Christoph Hellwig wrote:

>>  		if (error) {
>>  			if (uip)
>>  				IRELE(uip);
>> @@ -1421,9 +1474,24 @@ xfs_qm_init_quotainos(
>>  			return XFS_ERROR(error);
>>  		}
>>  	}
>> +	/* Why not define a XFS_SB_PQUOTINO? */
>> +	if (XFS_IS_PQUOTA_ON(mp) && pip == NULL) {
>> +		error = xfs_qm_qino_alloc(mp, &pip,
>> +					  sbflags | XFS_SB_GQUOTINO,
>> +					  flags | XFS_QMOPT_PQUOTA);
>> +		if (error) {
>> +			if (uip)
>> +				IRELE(uip);
>> +			if (gip)
>> +				IRELE(gip);
>> +
>> +			return XFS_ERROR(error);
> 
> It would probably be good to have return labels here so that each
> IRELE statements only needs to be written once, e.g.
> 
> out_rele_uip:
> 	if (uip)
> 		IRELE(uip);
> out_rele_gip:
> 	if (gip)
> 		IRELE(gip);
> out:
> 	return XFS_ERROR(error);

This change will be reflected in the next post, thanks for the comments.

-Jeff

> 
>> +			if ((error = xfs_qm_dqget(mp, NULL, (xfs_dqid_t)uid,
>> +						  XFS_DQ_USER,
>> +						  XFS_QMOPT_DQALLOC |
>> +						  XFS_QMOPT_DOWARN, &uq))) {
> 
> Please move assignments out of conditionals for all code touched, e.g.:
> 
> 			error = xfs_qm_dqget(mp, NULL, (xfs_dqid_t)uid,
> 					     XFS_DQ_USER,
> 					     XFS_QMOPT_DQALLOC |
> 					     XFS_QMOPT_DOWARN, &uq);
> 			if (error) {
> 
> Otherwise this looks good to me.


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux