Re: [PATCH 07/16] xfs: remove XFS_DQ_INACTIVE

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

 



On Mon, Nov 28, 2011 at 03:27:29AM -0500, Christoph Hellwig wrote:
> Free dquots when purging them during umount instead of keeping them around
> on the freelist in a degraded state.  The out of order locking in
> xfs_qm_dqpurge will be removed again later in this series.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

>  
> -	dqp->q_mount = NULL;
> -	dqp->q_hash = NULL;
> -	dqp->dq_flags = XFS_DQ_INACTIVE;
> -	memset(&dqp->q_core, 0, sizeof(dqp->q_core));
> +	list_del_init(&dqp->q_freelist);
> +	xfs_Gqm->qm_dqfrlist_cnt--;
> +
>  	xfs_dqfunlock(dqp);
>  	xfs_dqunlock(dqp);
> +
> +	mutex_unlock(&xfs_Gqm->qm_dqfrlist_lock);
>  	mutex_unlock(&qh->qh_lock);
> +
> +	xfs_qm_dqdestroy(dqp);
>  	return (0);
>  }

While there, you may as well make that a "return 0;"

> @@ -171,17 +176,6 @@ xfs_qm_destroy(
>  	xqm->qm_grp_dqhtable = NULL;
>  	xqm->qm_dqhashmask = 0;
>  
> -	/* frlist cleanup */
> -	mutex_lock(&xqm->qm_dqfrlist_lock);
> -	list_for_each_entry_safe(dqp, n, &xqm->qm_dqfrlist, q_freelist) {
> -		xfs_dqlock(dqp);
> -		list_del_init(&dqp->q_freelist);
> -		xfs_Gqm->qm_dqfrlist_cnt--;
> -		xfs_dqunlock(dqp);
> -		xfs_qm_dqdestroy(dqp);
> -	}
> -	mutex_unlock(&xqm->qm_dqfrlist_lock);
> -	mutex_destroy(&xqm->qm_dqfrlist_lock);
>  	kmem_free(xqm);
>  }

Don't we still need that mutex_destroy() call there?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
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