Re: getting file pointer from dentry/inode

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

 



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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux