On 5/4/06, UZAIR LAKHANI <uzairr_bs1b@xxxxxxxxx> wrote:
--- Tomas Hruby <thruby@xxxxxxxxx> wrote: > > Secondly is this logically correct to get the file > > pointer from inode/dentry etc. > > I don't think so. A single file on a disk (inode) > can be opened concurrently, > with different mode, with different read position, > etc. Many file structures > share the same inode then. > ok I agree that "A single file on a disk (inode) > can be opened concurrently, > with different mode, with different read position, > etc. Many file structures > share the same inode then." but since I am getting the dentry so can I use the dentry_open function. If this is ok then additionally what is the purpose of dentry_open function.
Ya, I think its ok to do so, as nfsd and others also do so (see http://sosdg.org/~coywolf/lxr/source/fs/nfsd/vfs.c#L684). dentry_open actually gets a new filp and then fill it with the information got from dentry (many from dentry_d_inode) and returns that newly created filp see the code for it (http://sosdg.org/~coywolf/lxr/source/fs/open.c#L784) -- Fawad Lateef - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html