[PATCH 12/14] audit: Simplify locking around untag_chunk()

Jan Kara jack at suse.cz
Fri Oct 19 08:22:10 UTC 2018


On Thu 18-10-18 08:27:40, Richard Guy Briggs wrote:
> >  	if (chunk->dead || !(entry->flags & FSNOTIFY_MARK_FLAG_ATTACHED)) {
> > -		mutex_unlock(&entry->group->mark_mutex);
> > -		if (new)
> > -			fsnotify_put_mark(new->mark);
> > -		goto out;
> > +		mutex_unlock(&audit_tree_group->mark_mutex);
> > +		return;
> 
> This isn't an error, but more a question of style.  Since the end of the
> function has been simplified, this could just be "goto out_mutex", or
> remove the one remaining "goto out_mutex" after the next patch and do
> the same as here since other exits aren't so clean.

Good point, I've switch this to "goto out_mutex". The result is attached.
Can I add your Reviewed-by tag?

								Honza
-- 
Jan Kara <jack at suse.com>
SUSE Labs, CR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-audit-Simplify-locking-around-untag_chunk.patch
Type: text/x-patch
Size: 4776 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-audit/attachments/20181019/371d1fd3/attachment.bin>


More information about the Linux-audit mailing list