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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 2 Mar 2009 12:11:28 +0530
From:	Manish Katiyar <mkatiyar@...il.com>
To:	ext4 <linux-ext4@...r.kernel.org>
Cc:	mkatiyar@...il.com
Subject: [PATCH] jbd2: Remove unnecessary check for NULL after calling kzalloc 
	with __GFP_NOFAIL

Since new_transaction is allocated with __GFP_NOFAIL flags, NULL check
for the returned value is
not needed.

Signed-off-by: Manish Katiyar <mkatiyar@...il.com>
---
 fs/jbd2/transaction.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 46b4e34..e22f993 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -101,14 +101,9 @@ static int start_this_handle(journal_t *journal,
handle_t *handle)
 	}

 alloc_transaction:
-	if (!journal->j_running_transaction) {
+	if (!journal->j_running_transaction)
 		new_transaction = kzalloc(sizeof(*new_transaction),
 						GFP_NOFS|__GFP_NOFAIL);
-		if (!new_transaction) {
-			ret = -ENOMEM;
-			goto out;
-		}
-	}

 	jbd_debug(3, "New handle %p going live.\n", handle);

-- 
1.5.4.3


Thanks -
Manish
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists