linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [sysfs] why ->delete_inode() instead of ->clear_inode()?
@ 2010-05-29  5:43 Al Viro
  2010-05-29  7:06 ` Eric W. Biederman
  0 siblings, 1 reply; 4+ messages in thread
From: Al Viro @ 2010-05-29  5:43 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: linux-fsdevel

	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 ;-/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-30  0:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-29  5:43 [sysfs] why ->delete_inode() instead of ->clear_inode()? Al Viro
2010-05-29  7:06 ` Eric W. Biederman
2010-05-29 11:36   ` Al Viro
2010-05-30  0:45     ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).