From: Herbert Poetzl Subject: Re: unlink (inode_operations) Date: Sun, 6 Jul 2003 05:52:42 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030706035242.GA1772@www.13thfloor.at> References: <20030705200701.GB26995@www.13thfloor.at> Reply-To: herbert@13thfloor.at Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Received: from www.13thfloor.at ([212.16.59.250]:46813 "EHLO www.13thfloor.at") by vger.kernel.org with ESMTP id S266603AbTGFDiF (ORCPT ); Sat, 5 Jul 2003 23:38:05 -0400 To: linux-fsdevel@vger.kernel.org Content-Disposition: inline In-Reply-To: <20030705200701.GB26995@www.13thfloor.at> List-Id: linux-fsdevel.vger.kernel.org On Sat, Jul 05, 2003 at 10:07:01PM +0200, Herbert Poetzl wrote: > [some background skipped] > > label_a: > if (o_dir->i_op && o_dir->i_op->unlink) > ret = o_dir->i_op->unlink(o_dir, o_de); > label_b: > if (!ret) > d_delete(de); > > between label_a and label_b I would expect the d_count > of o_de to be decremented ... but this doesn't happen > although the file referred to by o_de is unlinked ... it seems that the current implementation (at least of ext2) does not d_delete the dentry at all, so I assume this is the currently expected behaviour? I assume the d_delete was moved into vfs_unlink, and I'd better call vfs_unlink instead of the i_op->unlink? > obviously I've missed or misunderstood something, so > could anybody explain what is (not) happening? any additional explanations are welcome ;) > TIA, > Herbert