We traditionally haven't been using NODEMASK_ALLOC() in sysfs (or, in this
case, debugfs) functions because they're never deep in a call chain. Even
for 4K node support, which isn't a supported config on any arch that
allows CONFIG_MEMORY_HOTPLUG, this would only be 512 bytes on the short
stack.
I agree with the remainder of the points in your review and will be
sending fixes against -mm, thanks!
--