inode_operations's lookup question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was experimenting with the tutorial and code available at www.geocities.com/ravikiran_uvs/articles/rkfs.html

Attached code is a subset of that available at abovementioned link. Following are the observations, if I compile the code without defining macro HAVE_LOOKUP_FUNCTION

#mount -t rkfs none /mnt/cdrom
<rkfs_get_sb> invoked
<rkfs_super_read_inode> invoked
#file /mnt/cdrom
/mnt/cdrom/: can't stat `/mnt/cdrom/' (Not a directory)

If I compile the code with HAVE_LOOKUP_FUNCTION defined, following are the observations

#mount -t rkfs none /mnt/cdrom
<rkfs_get_sb> invoked
<rkfs_super_read_inode> invoked
#file /mnt/cdrom
/mnt/cdrom/: directory

but the function rkfs_inode_lookup is NOT invoked. How come kernel is able to differentiate without calling this function? Does it simply check if the member lookup is non-null? Which file the kernel code for this is defined in?

Regards,
Mohanlal

Attachment: rkfs.c
Description: Binary data


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux