Re: -mm -> 2.6.13 merge status

Christoph Hellwig
2005-06-27T20:34:23Z

On Mon, Jun 27, 2005 at 12:44:02PM -0700, Joel Becker wrote:
> On Mon, Jun 27, 2005 at 08:26:51PM +0100, Christoph Hellwig wrote:
> > drop_inode is not going to die, we need it to support filesystems that
> > want to call generic_delete_inode even for a non-null i_nlink. What's
> > hopefully going to die is the last instance of it that isn't either
> > generic_drop_inode or generic_delete_inode.
>
> OCFS2 uses drop_inode as well, as it must handle last-close when
> another node did the unlink. It fixes up i_nlink in that case, then
> calls generic_drop_inode().
> If there's a more elegant solution, we're all ears.

I think this still qualifies as calling generic_delete_inode because it's
a trivial wrapper. Manipulating i_nlink seems rather odd to me, I'd
say you should rather call into generic_delete_inode directly if
OCFS2_INODE_MAYBE_ORPHANED is set (that's what generic_drop_inode will
do for i_nlink == 0 anyway).

In fact given every cluster and possibly many network filesystems will
need this it might make sense to take the OCFS2_INODE_MAYBE_ORPHANED into
the VFS, i.e. make it an i_state flag (after fixing can_unuse to not do
something totally stupid with i_state)