On 11/14/19 3:34 PM, Christoph Hellwig wrote: > A lot of the logic in invalidate_partitions and rescan_partitions is > shared. Merge the two functions to simplify things. There is a small > behavior change in that we now send the kevent change notice also if we > were not invalidating but no partitions were found, which seems like > the right thing to do. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > Reviewed-by: Jan Kara <jack@xxxxxxx> > --- > block/ioctl.c | 2 +- > block/partition-generic.c | 38 ++++++++++++++------------------------ > fs/block_dev.c | 5 +---- > include/linux/genhd.h | 4 ++-- > 4 files changed, 18 insertions(+), 31 deletions(-) > Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 247165 (AG München), GF: Felix Imendörffer