On Tue, Nov 07, 2006 at 10:56:06AM -0500, Jeff Layton wrote: > retry: > - if (counter > max_reserved) { > - head = inode_hashtable + hash(sb,counter); > - res = counter++; > + if (sb->s_lastino >= max_reserved) { > + head = inode_hashtable + hash(sb,++sb->s_lastino); > + res = sb->s_lastino; I think it'd be clearer to write this as: res = ++sb->s_lastino; head = inode_hashtable + hash(sb, res); My eye skipped over the preincrement entirely the way it's currently written. > inode = find_inode_fast(sb, head, res); > if (!inode) { > spin_unlock(&inode_lock); > return res; > } > } else { > - counter = max_reserved + 1; > + sb->s_lastino = max_reserved; > } > goto retry; > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jeff Layton <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Matthew Wilcox <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jeff Layton <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jörn Engel <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Eric Sandeen <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jörn Engel <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Eric Sandeen <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jeff Layton <[email protected]>
- [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- Prev by Date: [PATCH] tty_ioctl: use termios for the old structure and termios2 for the new
- Next by Date: Re: [PATCH] add-process_session-helper-routine-deprecate-old-field-tidy
- Previous by thread: Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- Next by thread: Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- Index(es):