From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Theodore Ts'o" Subject: Why do we pass in a directory and a dentry to lookup() and rename() Date: Sun, 26 Dec 2010 16:45:51 -0500 Message-ID: Cc: linux-fsdevel@vger.kernel.org To: Al Viro Return-path: Received: from THUNK.ORG ([69.25.196.29]:34242 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752609Ab0LZVqD (ORCPT ); Sun, 26 Dec 2010 16:46:03 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: In the inode operations functions lookup() and rename(): struct dentry * (*lookup)(struct inode *inode, struct dentry *dentry, struct nameidata *nd); int (*rename)(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_entry); ... is the fact that we pass in the inode superfluous? i.e., it looks like in all cases one can obtain the inode by looking at dentry->d_parent. Or am I missing something? Thanks, - Ted