summaryrefslogtreecommitdiffstats
path: root/fs/ceph/osdmap.c
diff options
context:
space:
mode:
authorNoah Watkins <noah@noahdesu.com>2009-10-28 22:04:48 +0100
committerSage Weil <sage@newdream.net>2009-10-29 01:44:37 +0100
commit35e054a66e07f508aa7cfabc7db1757379093689 (patch)
tree3bf161c107ef24352c6ccc09b316b2e8ce0e74d8 /fs/ceph/osdmap.c
parentceph: replace list_entry with container_of (diff)
downloadlinux-35e054a66e07f508aa7cfabc7db1757379093689.tar.xz
linux-35e054a66e07f508aa7cfabc7db1757379093689.zip
ceph: remove redundant use of le32_to_cpu
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>
Diffstat (limited to 'fs/ceph/osdmap.c')
-rw-r--r--fs/ceph/osdmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c
index 72d75a239ac2..60012e05bdfd 100644
--- a/fs/ceph/osdmap.c
+++ b/fs/ceph/osdmap.c
@@ -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);