]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ceph: convert to use le32_add_cpu()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 28 Sep 2012 04:59:16 +0000 (12:59 +0800)
committerAlex Elder <elder@inktank.com>
Mon, 1 Oct 2012 19:30:54 +0000 (14:30 -0500)
Convert cpu_to_le32(le32_to_cpu(E1) + E2) to use le32_add_cpu().

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sage Weil <sage@inktank.com>
fs/ceph/caps.c

index 620daad201dbc8905f09359b8237a542be1f311e..3251e9cc64014fc99f7660d46388427732c88114 100644 (file)
@@ -1005,7 +1005,7 @@ static void __queue_cap_release(struct ceph_mds_session *session,
 
        BUG_ON(msg->front.iov_len + sizeof(*item) > PAGE_CACHE_SIZE);
        head = msg->front.iov_base;
-       head->num = cpu_to_le32(le32_to_cpu(head->num) + 1);
+       le32_add_cpu(&head->num, 1);
        item = msg->front.iov_base + msg->front.iov_len;
        item->ino = cpu_to_le64(ino);
        item->cap_id = cpu_to_le64(cap_id);