On Thu, 2 May 2013, Marcelo Tosatti wrote:
> On Tue, Apr 30, 2013 at 12:06:27PM -0400, Robert P. J. Day wrote:
> >
> > poking around in the KVM code and ran across this in kvm_main.c:
> >
> > ... snip ...
> > out_dir:
> > debugfs_remove_recursive(kvm_debugfs_dir);
> > out:
> > return r;
> > }
> >
> > static void kvm_exit_debug(void)
> > {
> > struct kvm_stats_debugfs_item *p;
> >
> > for (p = debugfs_entries; p->name; ++p)
> > debugfs_remove(p->dentry);
> > debugfs_remove(kvm_debugfs_dir);
> > }
> > ... snip ...
> >
> > is there any reason why the earlier removal uses the recursive
> > removal for debugfs, but the removal in kvm_exit_debug() does it the
> > manual, one-file-at-a-time way? just curious.
>
> Can't see any.
then if no one objects, i'll submit a patch to update it. no
functional change, obviously, but i was going to use that snippet to
demonstrate the use of debugfs in a kernel programming class and i
didn't want to have to explain the difference. :-) patch coming
shortly ...
rday
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html