summaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2013-09-19 13:09:10 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-09-19 13:09:12 +1000
commit8308f56c496aa9d973e7a5b927cf55bdda93d948 (patch)
tree2fa19613731df3d7da9b01e837b0b1d8aca90547 /block/genhd.c
parentbb32e85938f34f034945abf4fda76d53ef117a18 (diff)
parentea8adcaa2d6a9d8b3f9c19975f4328e1e7b81840 (diff)
Merge branch 'akpm-current/current'
Conflicts: Documentation/block/cmdline-partition.txt arch/s390/kernel/kprobes.c drivers/block/aoe/aoeblk.c drivers/rtc/rtc-hid-sensor-time.c fs/namei.c fs/namespace.c include/linux/interrupt.h include/linux/smp.h kernel/fork.c mm/filemap.c mm/mempolicy.c mm/mlock.c mm/sparse.c mm/swap.c scripts/checkpatch.pl
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 791f41943132..c5c47e0603be 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -2,6 +2,7 @@
* gendisk handling
*/
+#include <linux/sched.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/genhd.h>
@@ -849,7 +850,7 @@ static int show_partition(struct seq_file *seqf, void *v)
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)