Re: [PATCH] xfs: create helper for bmap finish & trans join in xfs_attr.c

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

 




On 11/11/15 10:54 PM, Eric Sandeen wrote:
> Calls to xfs_bmap_finish() and xfs_trans_ijoin(), and the
> associated comments were replicated several times across
> xfs_attr.c.
> 
> Factor out a new helper function, xfs_bmap_finish_and_join()
> to take care of this.
> 
> This also fixes an ASSERT() test of an uninitialized variable
> in several locations:
> 
> 	error = xfs_attr_thing(&args);
> 	if (!error) {
> 		error = xfs_bmap_finish(&args.trans, args.flist,
> 					&committed);
> 	}
> 	if (error) {
> 		ASSERT(committed);
> 
> If the first xfs_attr_thing() failed, we'd skip the xfs_bmap_finish,
> never set "committed", and then test it in the ASSERT.

Whoops, of course right after I send it I see that this can be used
(and the ASSERT problem exists) in xfs_attr_remote.c as well;
I'll send V2 tomorrow.

-Eric

_______________________________________________
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