lkml.org 
[lkml]   [2020]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] fs: export vfs_stat() and vfs_fstatat()
From
Date
On 2020/11/26 17:15, Christoph Hellwig wrote:
> On Thu, Nov 26, 2020 at 05:08:26PM +0800, Yicong Yang wrote:
>>> And why would you want to use them in kernel module? Please explain
>>> that in the patch that exports them, and please send that patch in the
>>> same series as the patches adding the users.
>> we're using it in the modules for testing our crypto driver on our CI system.
>> is it mandatory to upstream it if we want to use this function?
> Yes. And chances are that you do not actaully need these functions
> either, but to suggest a better placement I need to actually see the
> code.
> .

Sorry for not describing the issues I met correctly in the commit message.
Actually we're using inline function vfs_stat() for getting the
attributes, which calls vfs_fstatat():

static inline int vfs_stat(const char __user *filename, struct kstat *stat)
{
return vfs_fstatat(AT_FDCWD, filename, stat, 0);
}

after the vfs_fstatat is out-of-line it will make the moduler user of vfs_stat()
broken:

[ 5328.903677] crypto_zip_perf_test: Unknown symbol vfs_fstatat (err -2)

so the simplest way i think is directly export the vfs_fstatat().

Thanks,
Yicong




>

\
 
 \ /
  Last update: 2020-11-26 10:49    [W:0.041 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site