lkml.org 
[lkml]   [2005]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix cramfs making duplicate entries in inode cache
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_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: 4096 character
special file
Device: 700h/1792d Inode: 1 Links: 1 Device type: 1,1
Access: (0644/crw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 1970-01-01 01:00:00.000000000 +0100
Modify: 1970-01-01 01:00:00.000000000 +0100
Change: 1970-01-01 01:00:00.000000000 +0100
File: `namedpipe'
Size: 0 Blocks: 0 IO Block: 4096 fifo
Device: 700h/1792d Inode: 1 Links: 1
Access: (0644/prw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 1970-01-01 01:00:00.000000000 +0100
Modify: 1970-01-01 01:00:00.000000000 +0100
Change: 1970-01-01 01:00:00.000000000 +0100

Should iget5_locked() be used here?

Phillip
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-19 23:29    [W:0.047 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site