All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: "Eric W. Biederman" <ebiederm@aristanetworks.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: [sysfs] why ->delete_inode() instead of ->clear_inode()?
Date: Sat, 29 May 2010 06:43:21 +0100	[thread overview]
Message-ID: <20100529054321.GN31073@ZenIV.linux.org.uk> (raw)

	Is there any problem with simply doing

void sysfs_clear_inode(struct inode *inode)
{
	struct sysfs_dirent *sd  = inode->i_private;
	sysfs_put(sd);
}

instead of (mis)using ->delete_inode()?  Note that clear_inode() is
not going to be called on any inodes with positive i_count, that
you are forcibly evicting them from icache on the final iput() anyway
and that clear_inode() is never called twice on the same struct
inode()...

Al, very unenthusiastic about ->delete_inode() instances in general - that
sucker gets abused in the strangest ways by a lot of filesystems ;-/

             reply	other threads:[~2010-05-29  5:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29  5:43 Al Viro [this message]
2010-05-29  7:06 ` [sysfs] why ->delete_inode() instead of ->clear_inode()? Eric W. Biederman
2010-05-29 11:36   ` Al Viro
2010-05-30  0:45     ` Eric W. Biederman

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=20100529054321.GN31073@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=ebiederm@aristanetworks.com \
    --cc=linux-fsdevel@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.