Re: [git pull] more vfs bits

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

 



Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

>  - dentry_inode*() is supposed to be "the inode that would be used if
> the dentry was opened"
>
>    What part of "dentry_inode()" implies "if the dentry was opened" to
> you? Nothing. The name is fundamentally bad.

That because I wasn't thinking of it that way because it's used in a lot more
places than just opening code.  Audit, for example.

> And what *possible* situation could make that "_once()" version ever be
> valid? None. It's bogus. It's crap. It's insane. There is no way that it is
> *ever* a valid question to even ask. If the dentry is so unstable that you
> can't safely look at the inode, you had damn well better never ask "ok, what
> would the inode be if I opened this random pointer"?

There were originally some uses of dentry_inode_once(), but I think they
dropped out when I removed most of fs/*.c from consideration by the scripts.

>  - fs_inode*() is supposed to be "this is the inode that the native
> filesystem uses".

Yes.

> So of the four new helpers, I really don't see any of them as "good".
> I think "dentry_inode()" could remain, but even there I think the name
> should specify *what* it is ("d_opened_inode()"?  I don't like that name
> either,

That's also a poor choice.  The inode isn't even opened necessarily.  If it is
opened and you have the struct file *, you should almost certainly be using
file_inode().

David
--
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