From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaya Potter Subject: which dentry a page belongs to Date: Fri, 23 Apr 2004 10:57:03 -0400 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1082732223.1943.11.camel@zaphod> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from opus.cs.columbia.edu ([128.59.20.100]:19088 "EHLO opus.cs.columbia.edu") by vger.kernel.org with ESMTP id S264830AbUDWO5I (ORCPT ); Fri, 23 Apr 2004 10:57:08 -0400 Received: from dhcp-65-126.ee.columbia.edu (dhcp-65-126.ee.columbia.edu [128.59.65.126]) (authenticated bits=0) by opus.cs.columbia.edu (8.12.10/8.12.10) with ESMTP id i3NEv3C4016416 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Fri, 23 Apr 2004 10:57:08 -0400 (EDT) To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org I'm trying to do something funky w/ dentry's in a filesystem's writepage() function. I know it's easy to figure out which inode a page belongs to as the address_space structure is tied to it which points to the inode. page->mapping->host and it seems one should be able to figure out which vm_area_struct that the page belongs to, and from there figure out the correct dentry, but I'm unsure if this is easy or should work. It would seem that since the address_space object contains the vm_area_struct's of i_mmap and i_mmap_shared I should then be able to get the appropriate file and dentry object's through page->mapping->i_mmap->vm_file->f_dentry or page->mapping->i_mmap_shared->vm_file->f_dentry 1) Is this correct logic? I'm assuming the only things that matters in choosing which list is used if the page is map'd shared or not? is that correct as well? thanks, shaya