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]
Date:   Thu, 17 Dec 2020 12:55:49 -0800
From:   Joe Perches <joe@...ches.com>
To:     Anton Altaparmakov <anton@...era.com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: ntfs: extern vs inline?

Hello Anton.

I was looking around for bare inline uses and found this in
fs/ntfs/inode.[ch]:

$ git grep -w ntfs_new_extent_inode
fs/ntfs/inode.c:inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,
fs/ntfs/inode.h:extern ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,
fs/ntfs/mft.c:  ni = ntfs_new_extent_inode(base_ni->vol->sb, mft_no);

It seems odd for the function declaration to be extern but the definition
to be inline.

mft.c doesn't include inode.c, so the compiler shouldn't be able to inline it.

Likely the inline use in inode.c should be removed.
---
 fs/ntfs/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)fs/

diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index f7e4cbc26eaf..33386e8818de 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -399,8 +399,7 @@ void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni)
  */
 static struct lock_class_key extent_inode_mrec_lock_key;
 
-inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,
-		unsigned long mft_no)
+ntfs_inode *ntfs_new_extent_inode(struct super_block *sb, unsigned long mft_no)
 {
 	ntfs_inode *ni = ntfs_alloc_extent_inode();
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ