Thread (1 message) 1 message, 1 author, 2017-06-22

Re: [PATCH V7 2/6] mtd: partitions: remove sysfs files when deleting all master's partitions

From: Brian Norris <hidden>
Date: 2017-06-22 21:05:33

On Wed, Jun 21, 2017 at 08:26:43AM +0200, Rafał Miłecki wrote:
From: Rafał Miłecki <redacted>

When support for sysfs "offset" file was added it missed to update the
del_mtd_partitions function. It deletes partitions just like
mtd_del_partition does so both should also take care of removing sysfs
files.

This change moves sysfs_remove_files call to the shared function to fix
this issue.

Fixes: a62c24d755291 ("mtd: part: Add sysfs variable for offset of partition")
Cc: Dan Ehrenberg <redacted>
Signed-off-by: Rafał Miłecki <redacted>
---
V7: Introduction of this patch, it was separated from the 1/6. It should
    be clear now that this change is introduced. If something goes wrong
    it should also be easier to revert it this way.
Thanks, splitting this out is nice actually. And thanks for looking up
the background on this oversight.

I'm not really sure what the actual effect of that omission would be;
the file won't be left dangling in sysfs (the device is removed
entirely), but I'm not sure if that'd trigger some kind of internal
kobject memory leak.

Anyway, looks good to me.

Side note: this patch series sort of massages the definition of this
"offset" file. Now, IIUC, subpartitions will have an "offset" file
relative to their parent partition, not the master flash device. I'm not
sure which way is expected.

Brian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help