Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp477622yba; Sat, 4 May 2019 06:25:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwT5GpHla7buShUyNmt7E8HtHT72r+64Cl27w9DUsfSEm1dU0mPlyJFRV3lQtMP6jHzcK8C X-Received: by 2002:a63:1d4f:: with SMTP id d15mr17948206pgm.347.1556976327258; Sat, 04 May 2019 06:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556976327; cv=none; d=google.com; s=arc-20160816; b=wKiB2f4DxpqBkgapFh4MvIhAF3RLbscAHtVQzzTJKJmTTc45ek3wY9215tRwmFV2+g WDBJZnQJrnQdfRHrAoQmGTavXadnubP+5cJ+LG4X/Q0AuuUaBsynchT1/E3AvoFlEBou NcVrkbaAVzAkwhyXKbQEmANjUAUWEQAGGA07qRIHIcvfyadZa4n4+uCjFVsJpYXa8c8X vha/9+3BrbpoGTR/k6qWZiLO+K7ND0aWPTErCWBNm5JhzRfGxk+0qMPD0vicNQcMpmcT IHgY8t4undCkkJ1gYthhGKj0Ikc9+wsdvZ7hjmrZOJpYpbojDr0ZW2x1LuozkOAC1rwx Eecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=K3oSwCgY5wGFvEybmdzq3SL4WpQO+OI0mJqiYbLiIG0=; b=L82nfyNlgz7sM+aCEuVPww27yHjzgRV+juIoalpy/wE6/JUzxnnnRNgQRuMaWS7YzY sQjZ0InvyQmvFQhDniIqNICweDAiRxV7CX/kSSZJXBUoDkIMI+gOc95jiZAMBjclMtXf 8zp6LzCGJ433TtvyzMMHqQb31pO0xgUItEEJXLifKfVN1dEYt48saMBlovXR48gVL1WI 2I+fwDsdgKDUxpwwrKsnjkEvdUAa/h6VgHSECDqttf20TD9SPzl50VeOpvSNV9Y398XH 9+Rzkdth1vvWT5dE0eVs0/J0+suo7IQyo+HJsYz6ZzzFCBYzAx7x2u8l2hEyvsBwZNDN yT+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30si7455403plc.8.2019.05.04.06.25.12; Sat, 04 May 2019 06:25:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727219AbfEDNUL (ORCPT + 99 others); Sat, 4 May 2019 09:20:11 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:55990 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726781AbfEDNUK (ORCPT ); Sat, 4 May 2019 09:20:10 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hMuaG-0006ra-Hp; Sat, 04 May 2019 13:20:08 +0000 Date: Sat, 4 May 2019 14:20:08 +0100 From: Al Viro To: Carmeli Tamir Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] Use list.h instead of file_system_type next Message-ID: <20190504132008.GY23075@ZenIV.linux.org.uk> References: <20190504094549.10021-1-carmeli.tamir@gmail.com> <20190504094549.10021-2-carmeli.tamir@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190504094549.10021-2-carmeli.tamir@gmail.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 04, 2019 at 05:45:48AM -0400, Carmeli Tamir wrote: > From: Tamir > > Changed file_system_type next field to list_head and refactored > the code to use list.h functions. ... except that list_head is not a good match here. For one thing, we never walk that thing backwards. For another, filesystem can be used without ever going through register_filesystem(), making your data structure quite a mess - e.g. use of list_empty() (a perfectly normal list.h primitive) on it might oops on some instances. IOW, what you are making is not quite list_head and pretending it to be list_head is asking for serious headache down the road. Frankly, what's the point? Reusing an existing data type, to avoid DIY is generally a good advice, but then you'd better make sure that existing type *does* fit your needs and that your creation is playing by that type's rules. This patch does neither... NAKed-by: Al Viro