The patch titled Subject: block: restore /proc/partitions to not display non-partitionable removable devices has been added to the -mm tree. Its filename is block-restore-proc-partitions-to-not-display-non-partitionable-removable-devices.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Josh Hunt <johunt@xxxxxxxxxx> Subject: block: restore /proc/partitions to not display non-partitionable removable devices We found with newer kernels we started seeing the cdrom device showing up in /proc/partitions, but it was not there before. Looking into this I found that commit d27769ec ("block: add GENHD_FL_NO_PART_SCAN") introduces this change in behavior. It's not clear to me from the commit's changelog if this change was intentional or not. This comment still remains: /* Don't show non-partitionable removeable devices or empty devices */ so I've decided to send a patch to restore the behavior of not printing unpartitionable removable devices. Signed-off-by: Josh Hunt <johunt@xxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Kay Sievers <kay.sievers@xxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN block/genhd.c~block-restore-proc-partitions-to-not-display-non-partitionable-removable-devices block/genhd.c --- a/block/genhd.c~block-restore-proc-partitions-to-not-display-non-partitionable-removable-devices +++ a/block/genhd.c @@ -845,7 +845,7 @@ static int show_partition(struct seq_fil char buf[BDEVNAME_SIZE]; /* Don't show non-partitionable removeable devices or empty devices */ - if (!get_capacity(sgp) || (!disk_max_parts(sgp) && + if (!get_capacity(sgp) || (!(disk_max_parts(sgp) > 1) && (sgp->flags & GENHD_FL_REMOVABLE))) return 0; if (sgp->flags & GENHD_FL_SUPPRESS_PARTITION_INFO) _ Patches currently in -mm which might be from johunt@xxxxxxxxxx are linux-next.patch block-restore-proc-partitions-to-not-display-non-partitionable-removable-devices.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html