From 8f46bd9c78d629bd806439dd052222a9cd1291d0 Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Thu, 17 Sep 2015 09:57:04 +0800 Subject: [PATCH] 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 --- src/client/MetaRequest.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/MetaRequest.h b/src/client/MetaRequest.h index 2cf13c2d6a988..1bb0f6d3d9495 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() || -- 2.39.5