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>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Feb 2018 14:36:46 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Jan Kara <jack@...e.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Dan Williams <dan.j.williams@...el.com>,
        Ernesto A. Fernández 
        <ernesto.mnd.fernandez@...il.com>,
        Andreas Dilger <adilger@...ger.ca>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        Tejun Heo <tj@...nel.org>, linux-ext4@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] ext2: fix FS_IOMAP dependency

I ran into a randconfig link error on next-20180228 that appears to have
been caused by an older patch:

fs/ext2/inode.o: In function `ext2_setattr':
inode.c:(.text+0x19eb): undefined reference to `iomap_zero_range'

This adds a compile-time conditional around the code path so the
compiler can optimize out the reference in configurations that don't
need it anyway.

Fixes: 00697eed386d ("ext2: use iomap_zero_range() for zeroing truncated page in DAX path")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 fs/ext2/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 5d5e9f7b98d6..6e6db0ab3bd6 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -1296,7 +1296,7 @@ static int ext2_setsize(struct inode *inode, loff_t newsize)
 
 	inode_dio_wait(inode);
 
-	if (IS_DAX(inode)) {
+	if (IS_ENABLED(CONFIG_FS_DAX) && IS_DAX(inode)) {
 		error = iomap_zero_range(inode, newsize,
 					 PAGE_ALIGN(newsize) - newsize, NULL,
 					 &ext2_iomap_ops);
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ