Re: [PATCH] fix cramfs making duplicate entries in inode cache

2005-08-19 Thread Dave Johnson
Dave Johnson writes: > Phillip Lougher writes: > > Doesn't iget_locked() assume inode numbers are unique? > > > > In Cramfs inode numbers are set to 1 for non-data inodes (fifos, > > sockets, devices, empty directories), i.e > > > > %stat device namedpipe > >File: `device' > >Size: 0

Re: [PATCH] fix cramfs making duplicate entries in inode cache

2005-08-19 Thread Dave Johnson
Phillip Lougher writes: > Doesn't iget_locked() assume inode numbers are unique? > > In Cramfs inode numbers are set to 1 for non-data inodes (fifos, > sockets, devices, empty directories), i.e > > %stat device namedpipe >File: `device' >Size: 0 Blocks: 0 IO Block:

Re: [PATCH] fix cramfs making duplicate entries in inode cache

2005-08-19 Thread Phillip Lougher
Dave Johnson wrote: Patch below fixes this by making get_cramfs_inode() use the inode cache before blindly creating a new entry every time. This eliminates the duplicate inodes and duplicate buffer cache. > + struct inode * inode = iget_locked(sb, CRAMINO(cramfs_inode)); Doesn't iget_locke

[PATCH] fix cramfs making duplicate entries in inode cache

2005-08-19 Thread Dave Johnson
Every time cramfs_lookup() is called to lookup and inode for a dentry, get_cramfs_inode() will allocate a new inode without checking to see if that inode already exists in the inode cache. This is fine the first time, but if the dentry cache entry(ies) associated with that inode are aged out, but