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]
Date:   Fri, 25 Jan 2019 22:01:36 +0800
From:   Liu Xiang <liu.xiang6@....com.cn>
To:     jack@...e.com
Cc:     linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
        liuxiang_1999@....com, Liu Xiang <liu.xiang6@....com.cn>
Subject: [PATCH] ext2: Remove redundant check for finding no group

When best_desc keeps NULL, best_group keeps -1, too. So we can
return best_group directly.

Signed-off-by: Liu Xiang <liu.xiang6@....com.cn>
---
 fs/ext2/ialloc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 5c3d7b7..a0c5ea9 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -222,8 +222,6 @@ static int find_group_dir(struct super_block *sb, struct inode *parent)
 			best_desc = desc;
 		}
 	}
-	if (!best_desc)
-		return -1;
 
 	return best_group;
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ