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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9413fc25-e7d6-718f-18f2-cf0b9ac60b9c@shopee.com>
Date:   Wed, 19 Apr 2023 17:32:32 +0800
From:   Haifeng Xu <haifeng.xu@...pee.com>
To:     Miklos Szeredi <mszeredi@...hat.com>
Cc:     viro@...iv.linux.org.uk, bigeasy@...utronix.de, mcgrof@...nel.org,
        xiubli@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] vfs: clean up d_backing_inode() function



On 2023/4/19 16:05, Miklos Szeredi wrote:
> If we are touching that function, I'd just get rid of it completely
> (s/d_backing_inode/d_inode/).
> 
> Thanks,
> Miklos
> 
> On Wed, Apr 19, 2023 at 9:27 AM Haifeng Xu <haifeng.xu@...pee.com> wrote:
>>
>> Using an extra variable to record the inode is unnecessary, return it
>> directly.
>>
>> Signed-off-by: Haifeng Xu <haifeng.xu@...pee.com>
>> ---
>>  include/linux/dcache.h | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/include/linux/dcache.h b/include/linux/dcache.h
>> index 13023c7211d6..97324b6434e5 100644
>> --- a/include/linux/dcache.h
>> +++ b/include/linux/dcache.h
>> @@ -540,9 +540,7 @@ static inline struct inode *d_inode_rcu(const struct dentry *dentry)
>>   */
>>  static inline struct inode *d_backing_inode(const struct dentry *upper)
>>  {
>> -       struct inode *inode = upper->d_inode;
>> -
>> -       return inode;
>> +       return upper->d_inode;
>>  }
>>
>>  /**
>> --
>> 2.25.1
>>
> 

Yes, d_backing_inode() does the same thing with d_inode(). Thanks for your suggestion.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ