From: "Josef 'Jeff' Sipek" <jeffpc@josefsipek.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: XFS Mailing List <xfs@oss.sgi.com>
Subject: Re: [PATCH] XFS: random cleanups of xfs_swap_extents
Date: Wed, 12 Nov 2008 10:39:03 -0500 [thread overview]
Message-ID: <20081112153903.GE27125@josefsipek.net> (raw)
In-Reply-To: <20081112100958.GB32567@infradead.org>
On Wed, Nov 12, 2008 at 05:09:58AM -0500, Christoph Hellwig wrote:
> On Fri, Nov 07, 2008 at 06:00:54PM -0500, Josef 'Jeff' Sipek wrote:
> > XFS: random cleanups of xfs_swap_extents
> >
> > From: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
> >
> > 1) remove lock_flags var since it's never modified and only obfuscates the
> > code
> >
> > 2) calling kfree/vfree on a NULL is valid
>
> Looks good to me, but I'd go even further and kill the stupid locked
> variable by having the exit path structured as:
>
> out_trans_cancel:
> xfs_trans_cancel(tp, 0);
> out_unlock:
> xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
> out_free:
> kmem_free(tempifp);
> out:
> return error;
> }
>
> With the one case that does a trans_cancel with partially unlocked
> inodes handcoding most of it.
Ok, I'll do that.
Josef 'Jeff' Sipek.
--
Mankind invented the atomic bomb, but no mouse would ever construct a
mousetrap.
- Albert Einstein
next prev parent reply other threads:[~2008-11-12 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 23:00 [PATCH] XFS: random cleanups of xfs_swap_extents Josef 'Jeff' Sipek
2008-11-12 10:09 ` Christoph Hellwig
2008-11-12 15:39 ` Josef 'Jeff' Sipek [this message]
2008-12-22 13:02 ` Christoph Hellwig
2008-12-22 14:58 ` Josef 'Jeff' Sipek
2008-12-22 14:59 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081112153903.GE27125@josefsipek.net \
--to=jeffpc@josefsipek.net \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox