diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-19 13:18:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-19 13:18:05 -0700 |
commit | 2decd5a7cea2c1dae6418fe778857d43680a91aa (patch) | |
tree | 2ff5a57ef9db7a5fc000d323910b13ece778ab5b /fs | |
parent | b4fd4f890bca2291a12bb0807027db40f929a82d (diff) | |
parent | 878c495644be28cc881e7ee792f00fd879a1ebf9 (diff) | |
download | kernel_samsung_aries-2decd5a7cea2c1dae6418fe778857d43680a91aa.zip kernel_samsung_aries-2decd5a7cea2c1dae6418fe778857d43680a91aa.tar.gz kernel_samsung_aries-2decd5a7cea2c1dae6418fe778857d43680a91aa.tar.bz2 |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] cio: fix potential overflow in chpid descriptor
[S390] add missing device put
[S390] dasd: use correct label location for diag fba disks
Diffstat (limited to 'fs')
-rw-r--r-- | fs/partitions/ibm.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/partitions/ibm.c b/fs/partitions/ibm.c index 3e73de5..fc84976 100644 --- a/fs/partitions/ibm.c +++ b/fs/partitions/ibm.c @@ -74,6 +74,7 @@ int ibm_partition(struct parsed_partitions *state) } *label; unsigned char *data; Sector sect; + sector_t labelsect; res = 0; blocksize = bdev_logical_block_size(bdev); @@ -98,10 +99,19 @@ int ibm_partition(struct parsed_partitions *state) goto out_freeall; /* + * Special case for FBA disks: label sector does not depend on + * blocksize. + */ + if ((info->cu_type == 0x6310 && info->dev_type == 0x9336) || + (info->cu_type == 0x3880 && info->dev_type == 0x3370)) + labelsect = info->label_block; + else + labelsect = info->label_block * (blocksize >> 9); + + /* * Get volume label, extract name and type. */ - data = read_part_sector(state, info->label_block*(blocksize/512), - §); + data = read_part_sector(state, labelsect, §); if (data == NULL) goto out_readerr; |