lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170503182746.20076-1-fabf@skynet.be>
Date:   Wed,  3 May 2017 20:27:46 +0200
From:   Fabian Frederick <fabf@...net.be>
To:     Steven Whitehouse <swhiteho@...hat.com>,
        Bob Peterson <rpeterso@...hat.com>
Cc:     cluster-devel@...hat.com, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, fabf@...net.be
Subject: [PATCH 1/2 linux-next] gfs2: check rename2 flags at once

There's no need to update flags in gfs2_rename2()
This will ease whiteout addition.

Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 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)
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ