* file_inode() vs f_mapping->host
@ 2013-10-07 11:08 Andre Richter
2013-10-07 19:03 ` Al Viro
0 siblings, 1 reply; 2+ messages in thread
From: Andre Richter @ 2013-10-07 11:08 UTC (permalink / raw)
To: linux-kernel
Hi all,
in this thread ( https://lkml.org/lkml/2013/3/17/128 ), Al Viro argues
that file_inode() is not equal to f_mapping->host in certain cases.
I'm asking, because in arch/x86/kernel/msr.c, msr_seek() retrieves the
inode via f_mapping while one function later, msr_read() uses
file_inode().
Is this on purpose?
In general, how do I distinguish when to use what?
Thanks in advance,
Andre
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: file_inode() vs f_mapping->host
2013-10-07 11:08 file_inode() vs f_mapping->host Andre Richter
@ 2013-10-07 19:03 ` Al Viro
0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2013-10-07 19:03 UTC (permalink / raw)
To: Andre Richter; +Cc: linux-kernel
On Mon, Oct 07, 2013 at 01:08:09PM +0200, Andre Richter wrote:
> Hi all,
>
> in this thread ( https://lkml.org/lkml/2013/3/17/128 ), Al Viro argues
> that file_inode() is not equal to f_mapping->host in certain cases.
>
> I'm asking, because in arch/x86/kernel/msr.c, msr_seek() retrieves the
> inode via f_mapping while one function later, msr_read() uses
> file_inode().
> Is this on purpose?
Both of those should use file_inode(), but in that case both expressions
yield the same value. And no, it's not on purpose in case of msr.c -
just a historical accident.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-07 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-07 11:08 file_inode() vs f_mapping->host Andre Richter
2013-10-07 19:03 ` Al Viro
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.