[PATCH] xfs: create helper for bmap finish & trans join in xfs_attr.c
Eric Sandeen
sandeen at sandeen.net
Wed Nov 11 22:58:45 CST 2015
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
More information about the xfs
mailing list