[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130317184255.GA23280@redhat.com>
Date: Sun, 17 Mar 2013 19:42:55 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Anton Arapov <anton@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uprobes: Use file_inode()
On 03/17, Al Viro wrote:
>
> On Sun, Mar 17, 2013 at 07:00:36PM +0100, Oleg Nesterov wrote:
> > Cleanup. Now that we have f_inode/file_inode() we can use it
> > instead of ->f_mapping->host.
>
> No. This is *not* guaranteed to be the same thing in general; note that
> e.g. for block devices ->f_mapping->host is *not* equal to file_inode().
Yes,
> It probably is valid in this particular case,
And yes (I think). In fact I think ->f_mode is "more correct" in this case.
Say, if this uprobe was created by create_trace_uprobe() we use d_inode,
and uprobe_mmap/etc uses file_inode() only to compare this pointer with
uprobe->inode.
But I'll try to recheck, and:
> but at the very least you
> need to explain that in commit message,
OK. Will do, thanks.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists