aboutsummaryrefslogtreecommitdiff
path: root/fs/befs/endian.h
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-01-12 17:00:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 08:03:15 -0800
commite0e3d32bb40d28cf57a6a24e1e1d87ef03b913bd (patch)
tree7d4f90f2f65544559629dc0b3c2220454571b982 /fs/befs/endian.h
parent25f959d63d39c83fda09d93a052835ed35669b1a (diff)
befs: don't pass huge structs by value
'struct befs_disk_data_stream' is huge (~144 bytes) and it's being passed by value in fs/befs/endian.h::cpu_to_fsrun(). It would be better to pass a pointer. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Cc: Will Dyson <will_dyson@pobox.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/befs/endian.h')
-rw-r--r--fs/befs/endian.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/befs/endian.h b/fs/befs/endian.h
index 6cb84d896d0..27223878ba9 100644
--- a/fs/befs/endian.h
+++ b/fs/befs/endian.h
@@ -102,22 +102,22 @@ cpu_to_fsrun(const struct super_block *sb, befs_block_run n)
}
static inline befs_data_stream
-fsds_to_cpu(const struct super_block *sb, befs_disk_data_stream n)
+fsds_to_cpu(const struct super_block *sb, const befs_disk_data_stream *n)
{
befs_data_stream data;
int i;
for (i = 0; i < BEFS_NUM_DIRECT_BLOCKS; ++i)
- data.direct[i] = fsrun_to_cpu(sb, n.direct[i]);
+ data.direct[i] = fsrun_to_cpu(sb, n->direct[i]);
- data.max_direct_range = fs64_to_cpu(sb, n.max_direct_range);
- data.indirect = fsrun_to_cpu(sb, n.indirect);
- data.max_indirect_range = fs64_to_cpu(sb, n.max_indirect_range);
- data.double_indirect = fsrun_to_cpu(sb, n.double_indirect);
+ data.max_direct_range = fs64_to_cpu(sb, n->max_direct_range);
+ data.indirect = fsrun_to_cpu(sb, n->indirect);
+ data.max_indirect_range = fs64_to_cpu(sb, n->max_indirect_range);
+ data.double_indirect = fsrun_to_cpu(sb, n->double_indirect);
data.max_double_indirect_range = fs64_to_cpu(sb,
- n.
+ n->
max_double_indirect_range);
- data.size = fs64_to_cpu(sb, n.size);
+ data.size = fs64_to_cpu(sb, n->size);
return data;
}