On Wed, Jun 21, 2017 at 08:26:43AM +0200, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@xxxxxxxxxx> > > 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 <dehrenberg@xxxxxxxxxxxx> > Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx> > --- > 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html