xfs: use ->t_dfops in dqalloc transaction
authorBrian Foster <bfoster@redhat.com>
Thu, 12 Jul 2018 05:26:11 +0000 (22:26 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 12 Jul 2018 05:26:11 +0000 (22:26 -0700)
commit2ba13721257e2c76e90e8d83dfd9ba91c434355d
tree13cbd7ae5f70a2e13d7e800ab73501b3d7d3b144
parent32a9b7c65cfc7d9283055fc9d61e6393ee2aa984
xfs: use ->t_dfops in dqalloc transaction

xfs_dquot_disk_alloc() receives a transaction from the caller and
passes a local dfops along to xfs_bmapi_write(). If we attach this
dfops to the transaction, we have to make sure to clear it before
returning to avoid invalid access of stack memory.

Since xfs_qm_dqread_alloc() is the only caller, pull dfops into the
caller and attach it to the transaction to eliminate this pattern
entirely.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_dquot.c