Re: [RFC] [PATCH] Clean up fs.h union for ext2

Anton Altaparmakov (aia21@cam.ac.uk)
Sat, 05 Jan 2002 14:56:23 +0000


At 14:47 05/01/02, Daniel Phillips wrote:
>On January 5, 2002 03:29 pm, Anton Altaparmakov wrote:
> > If anyone wants a look NTFS TNG already has gone all the way (for a while
> > now in fact). Both fs inode and super block are fs internal slab caches
> and
> > both use static inline NTFS_I / NTFS_SB functions and the ntfs includes
> > from linux/fs.h are removed altogether. Code is in sourceforge cvs. For
> > instructions how to download the code or to browse it online, see:
>
>Nice, did you use the generic_ip fields?

Yes. From ntfs-driver-tng/linux/fs/ntfs/fs.h:

/**
* NTFS_SB - return the ntfs volume given a vfs super block
* @sb: VFS super block
*
* NTFS_SB() returns the ntfs volume associated with the VFS super block @sb.
*/
static inline ntfs_volume *NTFS_SB(struct super_block *sb)
{
return sb->u.generic_sbp;
}

/**
* NTFS_I - return the ntfs inode given a vfs inode
* @inode: VFS inode
*
* NTFS_I() returns the ntfs inode associated with the VFS @inode.
*/
static inline ntfs_inode *NTFS_I(struct inode *inode)
{
return inode->u.generic_ip;
}

Anton

-- 
   "I've not lost my mind. It's backed up on tape somewhere." - Unknown
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

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