All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@yandex.ru>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: is the inode an orphan?
Date: Thu, 18 Oct 2007 20:49:34 +0300	[thread overview]
Message-ID: <47179CAE.6010806@yandex.ru> (raw)

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 (Артём Битюцкий)

             reply	other threads:[~2007-10-18 17:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 17:49 Artem Bityutskiy [this message]
2007-10-18 18:01 ` is the inode an orphan? Al Viro
2007-10-19  7:07   ` Artem Bityutskiy
2007-10-30 14:10     ` Jan Kara
2007-11-19 15:02       ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47179CAE.6010806@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.