From: Jianpeng Ma Date: Thu, 17 Sep 2015 01:57:04 +0000 (+0800) Subject: clinet/MetaRequest: Remove the useless condition. X-Git-Tag: v9.1.0~103^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f46bd9c78d629bd806439dd052222a9cd1291d0;p=ceph.git clinet/MetaRequest: Remove the useless condition. "head.op & CEPH_MDS_OP_WRITE" include "head.op == CEPH_MDS_OP_CREATE". So remove the conditon statement "head.op == CEPH_MDS_OP_CREATE". Signed-off-by: Jianpeng Ma --- diff --git a/src/client/MetaRequest.h b/src/client/MetaRequest.h index 2cf13c2d6a9..1bb0f6d3d94 100644 --- a/src/client/MetaRequest.h +++ b/src/client/MetaRequest.h @@ -167,8 +167,7 @@ public: bool is_write() { return (head.op & CEPH_MDS_OP_WRITE) || - (head.op == CEPH_MDS_OP_OPEN && !(head.args.open.flags & (O_CREAT|O_TRUNC))) || - (head.op == CEPH_MDS_OP_CREATE && !(head.args.open.flags & (O_CREAT|O_TRUNC))); + (head.op == CEPH_MDS_OP_OPEN && !(head.args.open.flags & (O_CREAT|O_TRUNC))); } bool can_forward() { if (is_write() ||