Re: [PoC 2/7] Add kobject to super_block

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

 





On 04/28/2016 09:26 PM, Al Viro wrote:
On Thu, Apr 28, 2016 at 09:01:17PM -0500, Goldwyn Rodrigues wrote:
@@ -167,7 +204,8 @@ static void destroy_super(struct super_block *s)
  	WARN_ON(!list_empty(&s->s_mounts));
  	kfree(s->s_subtype);
  	kfree(s->s_options);
-	call_rcu(&s->rcu, destroy_super_rcu);
+	if (s->s_type->fs_flags & FS_CREATE_SYSFS)
+		kobject_del(&s->s_kobj);

So we have kobject_del() under a spinlock.  Wonderful...  Better yet,
you have the sodding kobjects sitting around well past the point when
the filesystem driver has gone through rmmod.

sysfs: lifetime rules made simple.  So simple that they don't fit a lot of
situations, but hey - it sure *looks* easy to use...

NAK.  If you want a description of super_block life cycle, I can describe it
to you.  But please, don't play with it until you understand it.



Yes, I understand what you are trying to say. Using kobject to destroy super_block does not make sense in the current scenario.

Thanks for your feedback.

--
Goldwyn
--
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