Re: [PATCH 2.6.2-rc1-mm2] fs/xfs/xfs_log_recover.c

From: Bryan Whitehead
Date: Sat Jan 24 2004 - 19:40:06 EST


I should have been more clear in the frist email. Sorry.

The variable "flags" is used in an if statement without having a value
assigned.

There is 2 switch statements that do this: (ITEM_TYPE(itemq) They execute
one right after the other with no returns. So it is redundant.

I think the patch fixes a cut/paste accident...

Here is a more complete diff so you can see what is going on:
--- fs/xfs/xfs_log_recover.c.orig 2004-01-23 23:17:35.402907768
-0800
+++ fs/xfs/xfs_log_recover.c 2004-01-23 23:19:09.368622808 -0800
@@ -1539,27 +1539,20 @@
itemq_next = itemq->ri_next;
buf_f = (xfs_buf_log_format_t *)itemq->ri_buf[0].i_addr;
switch (ITEM_TYPE(itemq)) {
case XFS_LI_BUF:
flags = buf_f->blf_flags;
break;
case XFS_LI_6_1_BUF:
case XFS_LI_5_3_BUF:
obuf_f = (xfs_buf_log_format_v1_t*)buf_f;
flags = obuf_f->blf_flags;
- break;
- }
-
- switch (ITEM_TYPE(itemq)) {
- case XFS_LI_BUF:
- case XFS_LI_6_1_BUF:
- case XFS_LI_5_3_BUF:
if (!(flags & XFS_BLI_CANCEL)) {

xlog_recover_insert_item_frontq(&trans->r_itemq,
itemq);
break;
}
case XFS_LI_INODE:
case XFS_LI_6_1_INODE:
case XFS_LI_5_3_INODE:
case XFS_LI_DQUOT:
case XFS_LI_QUOTAOFF:



On Sat, 24 Jan 2004, Christoph Hellwig wrote:

> On Fri, Jan 23, 2004 at 11:31:11PM -0800, Bryan Whitehead wrote:
> >
> > This fixes a warning on compile of the xfs fs module.
>
> This patch looks very strange. What error do you get without it?
>

--
Bryan Whitehead
Email:driver@xxxxxxxxxxxxx
WorkE:driver@xxxxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/