Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932231AbVK1UJj (ORCPT ); Mon, 28 Nov 2005 15:09:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932232AbVK1UJj (ORCPT ); Mon, 28 Nov 2005 15:09:39 -0500 Received: from adsl-80.mirage.euroweb.hu ([193.226.228.80]:59153 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S932231AbVK1UJj (ORCPT ); Mon, 28 Nov 2005 15:09:39 -0500 To: trond.myklebust@fys.uio.no CC: akpm@osdl.org, linux-kernel@vger.kernel.org In-reply-to: <1133207831.27574.95.camel@lade.trondhjem.org> (message from Trond Myklebust on Mon, 28 Nov 2005 14:57:11 -0500) Subject: Re: [PATCH 1/7] fuse: check directory aliasing in mkdir References: <1133207831.27574.95.camel@lade.trondhjem.org> Message-Id: From: Miklos Szeredi Date: Mon, 28 Nov 2005 21:09:13 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 775 Lines: 23 > > Check the created directory inode for aliases in the mkdir() method. > > > Can't you use d_add_unique() here? The patch is checking for hashed aliases of an inode. E.g. if /foo is a directory and has a ID of 28, and mkdir /bar returns the same ID, then the mkdir should fail. It's an illegal for the filesystem to create two directories refering to the same inode. OTOH d_add_unique() is looking for unhashed aliases to resurrect, which may or may not make sense in fuse. I'll think about it a bit more. Thanks, Miklos - 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/