diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-07-24 00:30:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:31 -0400 |
commit | 0a688ad713949643e201431d3f4a4ceddfeb70ca (patch) | |
tree | d56c3258db6eb2ea0df39c5e5d86302caa72042c /fs/ecryptfs/inode.c | |
parent | 29335c6a41568d4708d4ec3b9187f9b6d302e5ea (diff) |
ecryptfs: inode.c mmap.c use unaligned byteorder helpers
Fixe sparse warnings:
fs/ecryptfs/inode.c:368:15: warning: cast to restricted __be64
fs/ecryptfs/mmap.c:385:12: warning: incorrect type in assignment (different base types)
fs/ecryptfs/mmap.c:385:12: expected unsigned long long [unsigned] [assigned] [usertype] file_size
fs/ecryptfs/mmap.c:385:12: got restricted __be64 [usertype] <noident>
fs/ecryptfs/mmap.c:428:12: warning: incorrect type in assignment (different base types)
fs/ecryptfs/mmap.c:428:12: expected unsigned long long [unsigned] [assigned] [usertype] file_size
fs/ecryptfs/mmap.c:428:12: got restricted __be64 [usertype] <noident>
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r-- | fs/ecryptfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index c92cc1c00aae..7315547193ea 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mount.h> | 31 | #include <linux/mount.h> |
32 | #include <linux/crypto.h> | 32 | #include <linux/crypto.h> |
33 | #include <linux/fs_stack.h> | 33 | #include <linux/fs_stack.h> |
34 | #include <asm/unaligned.h> | ||
34 | #include "ecryptfs_kernel.h" | 35 | #include "ecryptfs_kernel.h" |
35 | 36 | ||
36 | static struct dentry *lock_parent(struct dentry *dentry) | 37 | static struct dentry *lock_parent(struct dentry *dentry) |
@@ -364,8 +365,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
364 | else | 365 | else |
365 | file_size = i_size_read(lower_dentry->d_inode); | 366 | file_size = i_size_read(lower_dentry->d_inode); |
366 | } else { | 367 | } else { |
367 | memcpy(&file_size, page_virt, sizeof(file_size)); | 368 | file_size = get_unaligned_be64(page_virt); |
368 | file_size = be64_to_cpu(file_size); | ||
369 | } | 369 | } |
370 | i_size_write(dentry->d_inode, (loff_t)file_size); | 370 | i_size_write(dentry->d_inode, (loff_t)file_size); |
371 | kmem_cache_free(ecryptfs_header_cache_2, page_virt); | 371 | kmem_cache_free(ecryptfs_header_cache_2, page_virt); |