Re: [PATCH 06/10] xfs: refactor the allocation and freeing of incore inode fork btree roots

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

 



> +/* Allocate a new incore ifork btree root. */
> +void
> +xfs_iroot_alloc(
> +	struct xfs_inode	*ip,
> +	int			whichfork,
> +	size_t			bytes)
> +{
> +	struct xfs_ifork	*ifp = xfs_ifork_ptr(ip, whichfork);
> +
> +	ifp->if_broot = kmalloc(bytes,
> +				GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL);
> +	ifp->if_broot_bytes = bytes;
> +}

.. actually.  Maybe this shuld return ifp->if_broot?  I guess that
would helpful in a few callers to directly assign that to the variable
for the root block.  Similar to what I did with xfs_idata_realloc a
while ago.





[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