From patchwork Wed May 3 18:27:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 9710247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D68A96021C for ; Wed, 3 May 2017 18:28:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC7C12861E for ; Wed, 3 May 2017 18:28:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C08F028613; Wed, 3 May 2017 18:28:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13E5E28613 for ; Wed, 3 May 2017 18:28:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752812AbdECS2C (ORCPT ); Wed, 3 May 2017 14:28:02 -0400 Received: from mailrelay105.isp.belgacom.be ([195.238.20.132]:47353 "EHLO mailrelay105.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752945AbdECS2C (ORCPT ); Wed, 3 May 2017 14:28:02 -0400 X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AjBCL3RO5MhdUtxih+wwl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0KP//rarrMEGX3/hxlliBBdydsK0UzbeO+4nbGkU+or+5+EgYd5JNUxJXwe?= =?us-ascii?q?43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6aijSI4DUTAhTyMxZu?= =?us-ascii?q?bqSwQ9aKzpf/6+fnwIHefQhOzAW9YK9/LBKrtgiZ4tIJgYp+J6Y24gHErntBZ6?= =?us-ascii?q?JdwmY+YRq5mBy03sqs8YR49CIY7+g5+tJNS779V741QbxREHItNGVjt+PxshyW?= =?us-ascii?q?YwKF53IaGksMnxZFGQnO71muUJ77vAPhtft71TXcN8CgHuN8Yiir86o+EEygsy?= =?us-ascii?q?wALTNstTiP0sE=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BLAgAOIApZ/zfGs1tcHAELAQUBgmpsK?= =?us-ascii?q?IFGjnORCgGVQoIPIYV9BAKEQUAYAQEBAQEBAQEBAQFqKIIzBAEdAQSDGCMpcSQ?= =?us-ascii?q?BEooUEbNJhBGHDYZfjHeCSgWdXJMHDYICj16IeYs7HziBCk4eGIRmAYJQPjaHD?= =?us-ascii?q?4FPAQEB?= X-IPAS-Result: =?us-ascii?q?A2BLAgAOIApZ/zfGs1tcHAELAQUBgmpsKIFGjnORCgGVQoI?= =?us-ascii?q?PIYV9BAKEQUAYAQEBAQEBAQEBAQFqKIIzBAEdAQSDGCMpcSQBEooUEbNJhBGHD?= =?us-ascii?q?YZfjHeCSgWdXJMHDYICj16IeYs7HziBCk4eGIRmAYJQPjaHD4FPAQEB?= Received: from 55.198-179-91.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([91.179.198.55]) by relay.skynet.be with ESMTP; 03 May 2017 20:27:57 +0200 From: Fabian Frederick To: Steven Whitehouse , Bob Peterson Cc: cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, fabf@skynet.be Subject: [PATCH 1/2 linux-next] gfs2: check rename2 flags at once Date: Wed, 3 May 2017 20:27:46 +0200 Message-Id: <20170503182746.20076-1-fabf@skynet.be> X-Mailer: git-send-email 2.9.3 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There's no need to update flags in gfs2_rename2() This will ease whiteout addition. Signed-off-by: Fabian Frederick --- fs/gfs2/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 9f605ea..9698796 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1706,9 +1706,7 @@ static int gfs2_rename2(struct inode *odir, struct dentry *odentry, struct inode *ndir, struct dentry *ndentry, unsigned int flags) { - flags &= ~RENAME_NOREPLACE; - - if (flags & ~RENAME_EXCHANGE) + if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE)) return -EINVAL; if (flags & RENAME_EXCHANGE)