Messages in this thread | | | Date | Fri, 26 Nov 1999 00:17:05 +0100 | From | Daniel Roesen <> | Subject | Re: [PATCH] Fix compilation warnings in dquot.c of 2.2.14pre8 |
| |
> > - int count; > > + int count=0; > > Hmm... I have a bad feeling about that.
...and you're absolutely right on this.
"count" is has only two occurences in get_empty_dquot():
/* * Try pruning the dcache to free up some dquots ... */ printk(KERN_DEBUG "get_empty_dquot: pruning %d\n", count); if (prune_dcache(0, 128)) { free_inode_memory(count); goto repeat; }
Taking a look at free_inode_memory():
void free_inode_memory(int goal) { spin_lock(&inode_lock); free_inodes(); spin_unlock(&inode_lock); }
Obviously "count" and "goal" are never used and completely obsolete - technically. But I think there was a reason for this. As I'm quite new to the kernel source I don't know wether free_inodes() ever took a goal parameter or if this is planned for the future.
So the question is: eliminate "count" and "goal" completely?
> It may be correct fix, but it may be turning random bug into deterministic > one _and_ removing a hint that something may be amiss here.
Exactly this is the case. Shame on me.
Thanx!
Daniel
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |