summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Dubeyko <slava@dubeyko.com>2013-04-17 15:58:33 -0700
committerWilly Tarreau <w@1wt.eu>2013-06-10 11:43:22 +0200
commitc3ff29a27cb6acef072eb552ca6aaefeee2839d3 (patch)
tree10e47261c1d6186d0e1ea3a915f937501631549f
parent9ecb77213c3f5393deaf3d9c942d25ce31f80074 (diff)
hfsplus: fix potential overflow in hfsplus_file_truncate()
commit 12f267a20aecf8b84a2a9069b9011f1661c779b4 upstream. Change a u32 to loff_t hfsplus_file_truncate(). Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r--fs/hfsplus/extents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index 0022eec63cda..b3d234e5b498 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -447,7 +447,7 @@ void hfsplus_file_truncate(struct inode *inode)
struct address_space *mapping = inode->i_mapping;
struct page *page;
void *fsdata;
- u32 size = inode->i_size;
+ loff_t size = inode->i_size;
int res;
res = pagecache_write_begin(NULL, mapping, size, 0,