Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S272792AbTHKQQ6 (ORCPT ); Mon, 11 Aug 2003 12:16:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S272773AbTHKQO3 (ORCPT ); Mon, 11 Aug 2003 12:14:29 -0400 Received: from bay-bridge.veritas.com ([143.127.3.10]:2821 "EHLO mtvmime01.veritas.com") by vger.kernel.org with ESMTP id S267952AbTHKQCQ (ORCPT ); Mon, 11 Aug 2003 12:02:16 -0400 Date: Mon, 11 Aug 2003 17:03:47 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@localhost.localdomain To: "Frederick, Fabian" cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH ?] iprune_sem In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1204 Lines: 26 On Sun, 10 Aug 2003, Frederick, Fabian wrote: > > Someone could tell me why we don't use iprune_sem in get_new_inode > like this ? > http://fabian.unixtech.be/kernel/inode060803.diff 1. iprune_sem was introduced for a specific umount versus prune race, see the comment upon it: no bearing on get_new_inode whatsoever. 2. How would downing a semaphore just before the spin_lock, upping it just after the spin_unlock, serve any purpose? 3. If it were useful, it should be upped on the exceptional path too. 4. Don't change "locked inode" comment to "inode unlocked": I_LOCK is set. 5. But worst of all, you remove the whole point of the old = find_inode. I think you're trying to say, a semaphore (not placed where you have it) could be used to prevent two tasks from allocating the same inode at the same time. Yes, but would single-thread inode allocation disastrously: much more efficient for both to try and check - as get_new_inode does. Hugh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/