diff options
author | Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com> | 2005-09-07 00:17:40 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-08 01:57:33 +0200 |
commit | a97c9bf33f4612e2aed6f000f6b1d268b6814f3c (patch) | |
tree | 5950b47e63f046ff4ce0812720a356ca3eac20dd /kernel/signal.c | |
parent | [PATCH] remove the second arg of do_timer_interrupt() (diff) | |
download | linux-a97c9bf33f4612e2aed6f000f6b1d268b6814f3c.tar.xz linux-a97c9bf33f4612e2aed6f000f6b1d268b6814f3c.zip |
[PATCH] fix cramfs making duplicate entries in inode cache
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 the inode entry is not aged out (which can
be quite common if the inode has buffer cache linked to it), cramfs_lookup()
will be called again and another inode will be allocated and added to the
inode cache creating a duplicate in the inode cache.
The big issue here is that the buffers associated with each inode cache entry
are not shared between the duplicates!
The older inode entries are now orphaned as no dentry points to it and won't
be freed until the buffer cache assoicated with them are first freed. The
newest entry will have to create all new buffer cache for each part of its
file as the old buffer cache is now orphaned as well.
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.
Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions