From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH]QNX6 filesystem (RO) driver Date: Tue, 21 Feb 2012 22:09:49 +0000 Message-ID: <20120221220949.GU23916@ZenIV.linux.org.uk> References: <20120215075750.GG23916@ZenIV.linux.org.uk> <20120215144037.GH23916@ZenIV.linux.org.uk> <20120216100043.GJ23916@ZenIV.linux.org.uk> <2977b399b903a3b7bff1ffe93e8d3dd9.squirrel@www.ontika.net> <20120217162006.GO23916@ZenIV.linux.org.uk> <20120217183548.GQ23916@ZenIV.linux.org.uk> <20120217185335.GR23916@ZenIV.linux.org.uk> <4F3EC8C4.3050707@ontika.net> <20120221220455.GT23916@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Kai Bankett Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:51742 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753328Ab2BUWJv (ORCPT ); Tue, 21 Feb 2012 17:09:51 -0500 Content-Disposition: inline In-Reply-To: <20120221220455.GT23916@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Feb 21, 2012 at 10:04:55PM +0000, Al Viro wrote: > What we need to do is either > * silently return 0 on thislen > QNX6_LONG_NAME_MAX, or > * return 0 and yell about corrupt /longfiles, or > * have qnx6_lookup() check that len <= QNX6_LONG_NAME_MAX and > return ERR_PTR(-ENAMETOOLONG) if it isn't. And lose the thislen check > completely. > > I'd probably go for the last variant; it's consistent with what other > filesystems are doing and it would avoid mess if we ever try to do > r/w variant. Oh, wait - you already are doing that in ->lookup()? Then it's definitely "let's lose thislen checks in qnx6_long_match() and qnx6_match()". Dead code is dead code... Pushed with that correction.