Re: of dentries and inodes

From: Andreas Dilger (adilger@clusterfs.com)
Date: Wed Aug 14 2002 - 17:20:23 EST


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/

- 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/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:38 EST