is the inode an orphan?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux Kernel Mailing List <linux-kernel@...>
Date: Thursday, October 18, 2007 - 1:49 pm

Hi,

I need a help from VFS folks: when I'm in ->unlink() in is there a safe way to 
to realize that ->delete_inod()e is going to be called? IOW, I'd like to call 
myfs_delete_inode() myself form ->unlink(), and not wait for VFS calling 
->delete_inode().

Or to put it differently, I'd like to know if the inode is an orphan or not in 
->unlink()?

AFAICS, if (inode->i_nlink == 0 && atomic_read(&inode->i_count) == 2) then this 
  file is not going to be an orphan. And AFAIC judge, it is safe to use this, 
but I'm not sure and kindly ask for help.

Thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
is the inode an orphan?, Artem Bityutskiy, (Thu Oct 18, 1:49 pm)
Re: is the inode an orphan?, Al Viro, (Thu Oct 18, 2:01 pm)
Re: is the inode an orphan?, Artem Bityutskiy, (Fri Oct 19, 3:07 am)
Re: is the inode an orphan?, Jan Kara, (Tue Oct 30, 10:10 am)
Re: is the inode an orphan?, Artem Bityutskiy, (Mon Nov 19, 11:02 am)