hfsplus: Apply Andrew Morton's incremental fix to hfsplus-limit-to-2tb.patch

svn path=/dists/trunk/linux-2.6/; revision=14374
This commit is contained in:
Ben Hutchings 2009-10-11 17:09:01 +00:00
parent d47a159011
commit e3e1389b83
1 changed files with 2 additions and 3 deletions

View File

@ -14,8 +14,7 @@ I am not confident that I can find and fix all cases where a sector
number may be truncated. For now, avoid data loss by refusing to mount
HFS+ volumes with more than 2^32 sectors (2TB).
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org
[plus fix by Andrew Morton <akpm@linux-foundation.org>]
---
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@ -23,7 +22,7 @@ Cc: stable@kernel.org
if (hfsplus_get_last_session(sb, &part_start, &part_size))
return -EINVAL;
+ if (part_start + part_size > 0x100000000) {
+ if ((u64)part_start + part_size > 0x100000000ULL) {
+ pr_err("hfs: volumes larger than 2TB are not supported yet\n");
+ return -EINVAL;
+ }