On Mar 14, 2008 16:08 +0300, Andrew Perepechko wrote: > @@ -395,7 +463,10 @@ static int v2_write_dquot(struct dquot * > { > int type = dquot->dq_type; > ssize_t ret; > - struct v2_disk_dqblk ddquot, empty; > + union v2_disk_dqblk ddquot, empty; > + struct super_block *sb = dquot->dq_sb; > + uint rev = sb_dqopt(sb)->info[type].u.v2_i.dqi_revision; > + uint dqblksz = v2_dqblksz(rev); In a few places you add new on-stack variables like "sb", but they aren't used more than 1 or 2 times. While it makes the code a tiny bit clearer (though not largely so for "sb" because it is only dquot->dq_sb) it does increase the stack usage, and that is never a good idea. > + union v2_disk_dqblk fakedquot; > > + memset(&fakedquot, 0, dqblksz); > + for (i = 0; i < dqstrinblk; i++) > + if (!DQF_GET(ddquot+i, rev, dqb_id) && > + memcmp(&fakedquot, ddquot+i, dqblksz)) Hmm, allocating "fakedquot" on the stack just to compare it to zero doesn't seem like a good use of space. What about doing the memcmp() against page_address(ZERO_PAGE(0))? It might be nice to have a permanent mapping of ZERO_PAGE(0) like void *zero_buffer that can be used for this. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html