From af7ad5906670d10c717504a8920fa0b7ed2ee0ff Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 8 May 2007 00:32:29 -0700 Subject: [PATCH] --- yaml --- r: 54748 b: refs/heads/master c: 866b04fccbf125cd39f2bdbcfeaa611d39a061a8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/inode.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 21719548d678..b48fc6dc588e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 63bd23591e6c3891d34e4c6dba7c6aa41b05caad +refs/heads/master: 866b04fccbf125cd39f2bdbcfeaa611d39a061a8 diff --git a/trunk/fs/inode.c b/trunk/fs/inode.c index 410f235c337b..df2ef15d03d2 100644 --- a/trunk/fs/inode.c +++ b/trunk/fs/inode.c @@ -524,7 +524,12 @@ static struct inode * find_inode_fast(struct super_block * sb, struct hlist_head */ struct inode *new_inode(struct super_block *sb) { - static unsigned long last_ino; + /* + * On a 32bit, non LFS stat() call, glibc will generate an EOVERFLOW + * error if st_ino won't fit in target struct field. Use 32bit counter + * here to attempt to avoid that. + */ + static unsigned int last_ino; struct inode * inode; spin_lock_prefetch(&inode_lock); @@ -683,7 +688,12 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval) */ ino_t iunique(struct super_block *sb, ino_t max_reserved) { - static ino_t counter; + /* + * On a 32bit, non LFS stat() call, glibc will generate an EOVERFLOW + * error if st_ino won't fit in target struct field. Use 32bit counter + * here to attempt to avoid that. + */ + static unsigned int counter; struct inode *inode; struct hlist_head *head; ino_t res;