forked from Minki/linux
xfs: zero allocation_args on the kernel stack
Zero the kernel stack space that makes up the xfs_alloc_arg structures. Signed-off-by: Mark Tinguely <tinguely@sgi.com> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
parent
d35e88faa3
commit
a00416844b
@ -1866,6 +1866,7 @@ xfs_alloc_fix_freelist(
|
|||||||
/*
|
/*
|
||||||
* Initialize the args structure.
|
* Initialize the args structure.
|
||||||
*/
|
*/
|
||||||
|
memset(&targs, 0, sizeof(targs));
|
||||||
targs.tp = tp;
|
targs.tp = tp;
|
||||||
targs.mp = mp;
|
targs.mp = mp;
|
||||||
targs.agbp = agbp;
|
targs.agbp = agbp;
|
||||||
|
@ -2437,6 +2437,7 @@ xfs_bmap_btalloc(
|
|||||||
* Normal allocation, done through xfs_alloc_vextent.
|
* Normal allocation, done through xfs_alloc_vextent.
|
||||||
*/
|
*/
|
||||||
tryagain = isaligned = 0;
|
tryagain = isaligned = 0;
|
||||||
|
memset(&args, 0, sizeof(args));
|
||||||
args.tp = ap->tp;
|
args.tp = ap->tp;
|
||||||
args.mp = mp;
|
args.mp = mp;
|
||||||
args.fsbno = ap->blkno;
|
args.fsbno = ap->blkno;
|
||||||
@ -3082,6 +3083,7 @@ xfs_bmap_extents_to_btree(
|
|||||||
* Convert to a btree with two levels, one record in root.
|
* Convert to a btree with two levels, one record in root.
|
||||||
*/
|
*/
|
||||||
XFS_IFORK_FMT_SET(ip, whichfork, XFS_DINODE_FMT_BTREE);
|
XFS_IFORK_FMT_SET(ip, whichfork, XFS_DINODE_FMT_BTREE);
|
||||||
|
memset(&args, 0, sizeof(args));
|
||||||
args.tp = tp;
|
args.tp = tp;
|
||||||
args.mp = mp;
|
args.mp = mp;
|
||||||
args.firstblock = *firstblock;
|
args.firstblock = *firstblock;
|
||||||
@ -3237,6 +3239,7 @@ xfs_bmap_local_to_extents(
|
|||||||
xfs_buf_t *bp; /* buffer for extent block */
|
xfs_buf_t *bp; /* buffer for extent block */
|
||||||
xfs_bmbt_rec_host_t *ep;/* extent record pointer */
|
xfs_bmbt_rec_host_t *ep;/* extent record pointer */
|
||||||
|
|
||||||
|
memset(&args, 0, sizeof(args));
|
||||||
args.tp = tp;
|
args.tp = tp;
|
||||||
args.mp = ip->i_mount;
|
args.mp = ip->i_mount;
|
||||||
args.firstblock = *firstblock;
|
args.firstblock = *firstblock;
|
||||||
|
@ -250,6 +250,7 @@ xfs_ialloc_ag_alloc(
|
|||||||
/* boundary */
|
/* boundary */
|
||||||
struct xfs_perag *pag;
|
struct xfs_perag *pag;
|
||||||
|
|
||||||
|
memset(&args, 0, sizeof(args));
|
||||||
args.tp = tp;
|
args.tp = tp;
|
||||||
args.mp = tp->t_mountp;
|
args.mp = tp->t_mountp;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user