Re: [sysfs] why ->delete_inode() instead of ->clear_inode()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Al Viro <viro@xxxxxxxxxxxxxxxxxx> writes:

> 	Is there any problem with simply doing
>
> void sysfs_clear_inode(struct inode *inode)
> {
> 	struct sysfs_dirent *sd  = inode->i_private;
> 	sysfs_put(sd);
> }

I can't see any problems with a quick review.

Given that drop_inode calls generic_delete_inode I don't see that
changing that will make any difference in the case of sysfs.

I can't remember why I did it that way but I can say nothing terribly subtle
is going on.  We need a reference to the sysfs_dirent from the inode and when
the inode goes away we need to clear the reference.

>From the look of things proc_delete_inode can also be changed to a clear_inode
method if that is preferred.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux