From: Mark Tinguely <tinguely@sgi.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: remove unneeded ASSERT from xfs_itruncate_extents
Date: Mon, 28 Jan 2013 08:14:12 -0600 [thread overview]
Message-ID: <510687B4.7000902@sgi.com> (raw)
In-Reply-To: <1359381870-30908-1-git-send-email-cmaiolino@redhat.com>
On 01/28/13 08:04, Carlos Maiolino wrote:
> There is no reason to ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); twice, so,
> remove one of these ASSERT calls
>
> Signed-off-by: Carlos Maiolino<cmaiolino@redhat.com>
> ---
> fs/xfs/xfs_inode.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index 66282dc..25226ea 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -1396,8 +1396,7 @@ xfs_itruncate_extents(
> int done = 0;
>
> ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
> - ASSERT(!atomic_read(&VFS_I(ip)->i_count) ||
> - xfs_isilocked(ip, XFS_IOLOCK_EXCL));
> + ASSERT(!atomic_read(&VFS_I(ip)->i_count));
> ASSERT(new_size<= XFS_ISIZE(ip));
> ASSERT(tp->t_flags& XFS_TRANS_PERM_LOG_RES);
> ASSERT(ip->i_itemp != NULL);
You removed an XFS_IOLOCK_EXCL assert not a duplicate
XFS_ILOCK_EXCL assert. It maybe more obvious if the
first assert read:
ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL) ||
xfs_isilocked(ip, XFS_IOLOCK_EXCL));
ASSERT(!atomic_read(&VFS_I(ip)->i_count));
...
--Mark Tinguely.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-01-28 14:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 14:04 [PATCH] xfs: remove unneeded ASSERT from xfs_itruncate_extents Carlos Maiolino
2013-01-28 14:14 ` Mark Tinguely [this message]
2013-01-28 16:26 ` Carlos Maiolino
2013-01-29 3:31 ` Dave Chinner
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=510687B4.7000902@sgi.com \
--to=tinguely@sgi.com \
--cc=cmaiolino@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.