Skip to content

Commit

Permalink
ceph: remove redundant use of le32_to_cpu
Browse files Browse the repository at this point in the history
Using stripe unit size calculated and saved on the stack to avoid
a redundant call to le32_to_cpu.

Signed-off-by: Noah Watkins <noah@noahdesu.com>
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Noah Watkins authored and Sage Weil committed Oct 29, 2009
1 parent fbbccec commit 35e054a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/osdmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ void ceph_calc_file_object_mapping(struct ceph_file_layout *layout,

dout("mapping %llu~%llu osize %u fl_su %u\n", off, *plen,
osize, su);
su_per_object = osize / le32_to_cpu(layout->fl_stripe_unit);
su_per_object = osize / su;
dout("osize %u / su %u = su_per_object %u\n", osize, su,
su_per_object);

Expand Down

0 comments on commit 35e054a

Please sign in to comment.