Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422713AbXBURIu (ORCPT ); Wed, 21 Feb 2007 12:08:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422693AbXBURIu (ORCPT ); Wed, 21 Feb 2007 12:08:50 -0500 Received: from tmailer.gwdg.de ([134.76.10.23]:51940 "EHLO tmailer.gwdg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422714AbXBURIq (ORCPT ); Wed, 21 Feb 2007 12:08:46 -0500 Date: Wed, 21 Feb 2007 18:07:56 +0100 (MET) From: Jan Engelhardt To: Greg KH cc: "Serge E. Hallyn" , Linux Kernel Mailing List Subject: Re: securityfs_create_dir strange comment In-Reply-To: <20070221040526.GA8207@kroah.com> Message-ID: References: <20070220211849.GA3416@vino.hallyn.com> <20070220222652.GB21696@kroah.com> <20070221040526.GA8207@kroah.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Report: Content analysis: 0.0 points, 6.0 required _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 707 Lines: 26 Hello Greg, On Feb 20 2007 20:05, Greg KH wrote: > >Try this instead: > if (!de) > return -ENOMEM; > if ((IS_ERR(de)) && (PTR_ERR(de) != -ENODEV)) > return PTR_ERR(de); > return 0; > >That should cover everything properly, right? In case memory could not be allocated, why does not securityfs_*() return ERR_PTR(-ENOMEM) then? (I think, that's the quintessential question after all. And thanks for giving an example what to do in the ENODEV case.) Jan -- - 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/