Re: [PATCH 3/3] xfs: zero allocation_args on the kernel stack

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

 



On Wed, Sep 19, 2012 at 11:31:36AM -0500, tinguely@xxxxxxx wrote:
> The allocation argument structures is created on the kernel stack space. This
> patch makes sure the userdata variable is always initialized.
> 
> The better solution is always memset to 0 or "= { 0 }" the xfs_alloc_arg

Yes, please do that and remove all the initialisations to zero
instead. It's much easier to maintain in future if new additions
to structures are automaticlly zeroed by the code that uses it...

> and xfs_bmalloca structures. I believe there will only be 4 places that need
> this memset change.

The only definition of xfs_bmalloca (in xfs_bmapi_write) is already
zeroed:

	struct xfs_bmalloca     bma = { 0 };    /* args for xfs_bmap_alloc */

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