From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kevin Hao" Subject: Re: How Linux /proc filesystem convert a fd to the actual pathname? Date: Tue, 21 Aug 2007 14:03:58 +0800 Message-ID: <8dd980de0708202303l2d3be5bj6682a98df4a40d99@mail.gmail.com> References: <4ae3c140708201958x3c88b317o2ba9be64177978f5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: linux-kernel , linux-fsdevel To: "Xin Zhao" Return-path: Received: from an-out-0708.google.com ([209.85.132.246]:56455 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758168AbXHUGD7 (ORCPT ); Tue, 21 Aug 2007 02:03:59 -0400 Received: by an-out-0708.google.com with SMTP id d31so141739and for ; Mon, 20 Aug 2007 23:03:58 -0700 (PDT) In-Reply-To: <4ae3c140708201958x3c88b317o2ba9be64177978f5@mail.gmail.com> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org > I am curious how Linux convert an fd to the pathname? Does it > recursively walk back from current dentry to the root? Using d_path. > Can someone point me to the right place in the kernel where this > functionality is implemented? do_proc_readlink may be the function you want.