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>] [day] [month] [year] [list]
Message-ID: <ddd61469-637c-4a1f-a024-141574fd76a8@stanley.mountain>
Date: Wed, 12 Feb 2025 18:27:46 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
	Matthew Wilcox <willy@...radead.org>, linux-fsdevel@...r.kernel.org,
	nvdimm@...ts.linux.dev, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: [PATCH] fs/dax: Remove unnecessary check in dax_break_layout_final()

The "page" pointer is always NULL at this point.  Adding a check is
a bit confusing.  Delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
 fs/dax.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/dax.c b/fs/dax.c
index 9e4940a0b286..21a743996f90 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -987,8 +987,7 @@ void dax_break_layout_final(struct inode *inode)
 		wait_page_idle_uninterruptible(page, inode);
 	} while (true);
 
-	if (!page)
-		dax_delete_mapping_range(inode->i_mapping, 0, LLONG_MAX);
+	dax_delete_mapping_range(inode->i_mapping, 0, LLONG_MAX);
 }
 EXPORT_SYMBOL_GPL(dax_break_layout_final);
 
-- 
2.47.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ