* of dentries and inodes
@ 2002-08-14 15:34 Eli Carter
2002-08-14 22:20 ` Andreas Dilger
0 siblings, 1 reply; 2+ messages in thread
From: Eli Carter @ 2002-08-14 15:34 UTC (permalink / raw)
To: linux-kernel
All,
Ok, I'm puzzled... I have not yet found an answer from groups.google or
my oreilly tomes. :/
(I'm looking at a 2.2 kernel, but I doubt this has changed.) In ext2, as
well as many other fs's, there appears a line much like this in their
'struct file_system_type.read_super()' function:
sb->s_root = d_alloc_root(iget(sb, EXT2_ROOT_INO), NULL);
Now, I was under the impression that for each iget(), you need to have
an iput() when you're done with the inode... which in this case would
mean an iput() in 'struct super_operations.put_super()'... but I don't
see one there.
So I would expect the root inode might hang around in the filesystem
cache(s) after a umount. But I would expect that to cause filesystem
corruption on a regular basis. ('mount, umount, mkfs' for example,
would yield an inconsistancy between disk and filesystem cache.)
I'm missing something, or misunderstand something, or both... can anyone
point me in the right direction?
TIA,
Eli
--------------------. "If it ain't broke now,
Eli Carter \ it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: of dentries and inodes
2002-08-14 15:34 of dentries and inodes Eli Carter
@ 2002-08-14 22:20 ` Andreas Dilger
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Dilger @ 2002-08-14 22:20 UTC (permalink / raw)
To: Eli Carter; +Cc: linux-kernel
On Aug 14, 2002 10:34 -0500, Eli Carter wrote:
> (I'm looking at a 2.2 kernel, but I doubt this has changed.) In ext2, as
> well as many other fs's, there appears a line much like this in their
> 'struct file_system_type.read_super()' function:
>
> sb->s_root = d_alloc_root(iget(sb, EXT2_ROOT_INO), NULL);
>
> Now, I was under the impression that for each iget(), you need to have
> an iput() when you're done with the inode... which in this case would
> mean an iput() in 'struct super_operations.put_super()'... but I don't
> see one there.
The dput(root) is done in fs/super.c (kill_super in 2.4).
Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-14 22:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-14 15:34 of dentries and inodes Eli Carter
2002-08-14 22:20 ` Andreas Dilger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.