• David Chinner's avatar
    Inode: Allow external list initialisation · 8290c35f
    David Chinner authored
    To allow XFS to combine the XFS and linux inodes into a single
    structure, we need to drive inode lookup from the XFS inode cache,
    not the generic inode cache. This means that we need initialise a
    struct inode from a context outside alloc_inode() as it is no longer
    used by XFS.
    
    After inode allocation and initialisation, we need to add the inode
    to the superblock list, the in-use list, hash it and do some
    accounting. This all needs to be done with the inode_lock held and
    there are already several places in fs/inode.c that do this list
    manipulation.  Factor out the common code, add a locking wrapper and
    export the function so ti can be called from XFS.
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
    Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
    8290c35f
inode.c 38.8 KB