Subject: insmod

Friends,


I have written a kernel Virtual file system which merges different
filesystem directories. For this I am using a VFS function
inode_dir_notify() function to notify the parent inodes. Now I want my
virtual file system to be converted as a module. I am facing problems
while inserting the module. When I do a insmod it is giving
Unresolved symbol inode_dir_notify even though it is defined in the kernel
VFS. It is working in case of statically linked version.

Can somebody please suggest me why this is happening?

Please CC the reply to [email protected]

Thanks and regards,
sathya


2002-11-23 19:12:16

by Ronghua Zhang

[permalink] [raw]
Subject: Re: insmod

inode_dir_notify may not be exported, that's why when you insmod, kernel
reports Unresolved symbol. run 'cat /proc/ksyms | grep 'inode_dir_notify'
to see if it's exported.

Ronghua

On Sun, 24 Nov 2002, Sathyanarayana.A.N - 01cs6002 wrote:

> Friends,
>
>
> I have written a kernel Virtual file system which merges different
> filesystem directories. For this I am using a VFS function
> inode_dir_notify() function to notify the parent inodes. Now I want my
> virtual file system to be converted as a module. I am facing problems
> while inserting the module. When I do a insmod it is giving
> Unresolved symbol inode_dir_notify even though it is defined in the kernel
> VFS. It is working in case of statically linked version.
>
> Can somebody please suggest me why this is happening?
>
> Please CC the reply to [email protected]
>
> Thanks and regards,
> sathya
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2002-11-23 19:19:33

by Sean Neakums

[permalink] [raw]
Subject: Re: insmod

commence Sathyanarayana.A.N - 01cs6002 quotation:

> I have written a kernel Virtual file system which merges different
> filesystem directories. For this I am using a VFS function
> inode_dir_notify() function to notify the parent inodes. Now I want
> my virtual file system to be converted as a module. I am facing
> problems while inserting the module. When I do a insmod it is giving
> Unresolved symbol inode_dir_notify even though it is defined in the
> kernel VFS. It is working in case of statically linked version.
>
> Can somebody please suggest me why this is happening?

Looks to me (a kernel know-nothing, looking at 2.4.19) that since
inode_dir_notify is defined as a static inline function (in
include/linux/dnotify.h), no separate definition is being emitted.
(This inline seems to check whether a notify needs to be done, and
calls __inode_dir_notify if necessary.) __inode_dir_notify *is* a
regular function, but it doesn't seem to be exported, which I believe
means it can't be referenced by a module.

--
/ |
[|] Sean Neakums | Questions are a burden to others;
[|] <[email protected]> | answers a prison for oneself.
\ |