Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2358524rdb; Mon, 5 Feb 2024 04:20:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEUxLochVFDbRFjOlevmqDdETDendB0M56qdvlO/Lpap0ehSsDqZqhjYOBtmbdp0kcZc71 X-Received: by 2002:a17:903:234b:b0:1d9:a14c:eeb0 with SMTP id c11-20020a170903234b00b001d9a14ceeb0mr6101897plh.43.1707135624536; Mon, 05 Feb 2024 04:20:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707135624; cv=pass; d=google.com; s=arc-20160816; b=lOzpIR0PaVwSEwtYhtfNUEwF/Xq5KrI9FUkmTNMmk8D8IpYfqvySyj79w0Vah7xYq0 xM27Qf6s1OCqVyjb0LZHdVrkJMp/k54sh/Tbm0GPE8DMAjqN2aTqoRPmo+PTEhIh9Yyo G9B7sm1P4dK/uUtkTNHi/oyAeCz9K43zD8oJPotxjZ42vLtLCIWRQEePA1IsCufFuWPT ebG6CvASECItlfHJX+gv5Ob4TMFHdScElnQtk1pm8GgPPaWTDCnjPhYRGl2cN6dPWJ8s qLOt89LdnhUqOXFnNd3d2Ud37P/HpQ6OM0imuUbSsryUCJA+HhPRWjvqhGpeRoO8YN2S 6JdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/b0/E+LgoUpTzacqMtaWGjvr1isdFM5hNfcKVgwuYNg=; fh=z0Y8a590AFE3FSnL+C/APGnEWUhilLlHFZpVR0pgVwc=; b=niSPisdPiGEX/flUCk3Du2/B7sF1FKq9YEo1oRqHCWZj7gj7fVo0yc9HmDsWNw4ovd f8E8UM50opd++TZf8LCGhaP19JctnvxfgRUBNgh/8smRweeMYBPDeONt/3PN+F0m2vs2 iNJZUyJMChVJiUZT4Hhjiyu5p1vt+Pc5ogCnQC/n3wRu77D1L+afSU7ZZ97GfOpD6Exx p2UDjXe4h/HA1a/PdchOT0aEdHBwvFVdTsOrPfCwG7+Ak775Z3WBBHRuNUYg5sbN7ari xshTztnNmr+wMv4UaUnQ9hiOHyzbT341HsElyJpsRQ6lXW+HhQzDnHk8jQ1Ay/yasNrS A0Ww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NI3CgvHq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1773-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1773-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWDVNWkRjcMRHWGpEuqs9MAXwaLIlwB8f6qk7/CZdy4H/xCjvwxjVsU7FZ9Zk1XVGM+6fz5J7tGRdVeFlxrNkBFj7GNHX2dytMr9mRoyA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g14-20020a1709029f8e00b001d986f6b822si4247067plq.449.2024.02.05.04.20.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 04:20:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1773-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NI3CgvHq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1773-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1773-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 33C39281D95 for ; Mon, 5 Feb 2024 12:20:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8CF51BC4E; Mon, 5 Feb 2024 12:20:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NI3CgvHq" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C0871BC3A; Mon, 5 Feb 2024 12:20:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707135609; cv=none; b=M32jxlRBK1Bi6wxXjgj0BBINnZRF+0XWhCWaPp07HLb/BetPSDkJOdLJmkcIX7VlL4f220jhISRmeH8R/FLdg6b9419pi7nlunMMpombtN0j2qbXUEK/d0e3+/yX0lKqLBXB5cyDoR5flBKYLy7aNXijhr7YuKqVUjboV68h8mM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707135609; c=relaxed/simple; bh=7//g9J4D+ZXpm9UU4QExrEcw6hVi83+PWFQfkzUzwQg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=umu2cF5gD4dIt1c6IXxfxrL2lFRXkhDJf4rB+/onymC6e20b4ahpfIMNUpr5g3Q7WkAYNyTFtOQYuUMfUE6BOjITaSf91ZfIMovJJEPpDwdp8fYIgFPylIW4u3e6r3G0mXkaWakEFpuxdOtDDSZgz/E0iM0JaKHoCQ6AGdDhn/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NI3CgvHq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6DC7C433F1; Mon, 5 Feb 2024 12:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707135609; bh=7//g9J4D+ZXpm9UU4QExrEcw6hVi83+PWFQfkzUzwQg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NI3CgvHqbCduKOUG55PcantMhEuO6cn+Q82WktDz/McB8+xXuzAr9oWfxBNRDlJIq EUGGrhAl14I7YROetxKLGMcqGt8Ru+AmVB9bfDoQy4MxBuJTscGI6an5jXX1a1UxlY iH0tINjNfz+a+kl3LaOWdJAlnwQq7npi5RyjBS1soNm/JRgw9c+6hBFsGgc/vYpFgs dev0mLv7LL+uzC+/lrHORqWInlmNXxUEGlfF+z82l0aWpZ8rLwcWppSKbu1HoVVCxo MqPT8nFMBRA5HdSKbdJcN8lFf+Y1tStm+kUjtpb43bBeSysyW23YnK908iHBQqL4uI oEI2OhqzX3GkA== Date: Mon, 5 Feb 2024 13:19:57 +0100 From: Christian Brauner To: Jeff Layton Cc: Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Chuck Lever , Alexander Viro , Jan Kara , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Howells , Marc Dionne , Xiubo Li , Ilya Dryomov , Alexander Aring , David Teigland , Andreas Gruenbacher , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Trond Myklebust , Anna Schumaker , Mark Fasheh , Joel Becker , Joseph Qi , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Namjae Jeon , Sergey Senozhatsky , Miklos Szeredi , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org, gfs2@lists.linux.dev, linux-nfs@vger.kernel.org, ocfs2-devel@lists.linux.dev, linux-cifs@vger.kernel.org Subject: Re: [PATCH v3 04/47] filelock: add some new helper functions Message-ID: <20240205-fragil-begraben-4b78fd1b5981@brauner> References: <20240131-flsplit-v3-0-c6129007ee8d@kernel.org> <20240131-flsplit-v3-4-c6129007ee8d@kernel.org> <20240205-wegschauen-unappetitlich-2b0926023605@brauner> <20240205-laufen-hosen-38578e076df5@brauner> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Feb 05, 2024 at 07:06:00AM -0500, Jeff Layton wrote: > On Mon, 2024-02-05 at 12:57 +0100, Christian Brauner wrote: > > On Mon, Feb 05, 2024 at 06:55:44AM -0500, Jeff Layton wrote: > > > On Mon, 2024-02-05 at 12:36 +0100, Christian Brauner wrote: > > > > > diff --git a/include/linux/filelock.h b/include/linux/filelock.h > > > > > index 085ff6ba0653..a814664b1053 100644 > > > > > --- a/include/linux/filelock.h > > > > > +++ b/include/linux/filelock.h > > > > > @@ -147,6 +147,29 @@ int fcntl_setlk64(unsigned int, struct file *, unsigned int, > > > > >  int fcntl_setlease(unsigned int fd, struct file *filp, int arg); > > > > >  int fcntl_getlease(struct file *filp); > > > > >   > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > +static inline bool lock_is_unlock(struct file_lock *fl) > > > > > +{ > > > > > + return fl->fl_type == F_UNLCK; > > > > > +} > > > > > + > > > > > +static inline bool lock_is_read(struct file_lock *fl) > > > > > +{ > > > > > + return fl->fl_type == F_RDLCK; > > > > > +} > > > > > + > > > > > +static inline bool lock_is_write(struct file_lock *fl) > > > > > +{ > > > > > + return fl->fl_type == F_WRLCK; > > > > > +} > > > > > + > > > > > +static inline void locks_wake_up(struct file_lock *fl) > > > > > +{ > > > > > + wake_up(&fl->fl_wait); > > > > > +} > > > > > + > > > > > +/* for walking lists of file_locks linked by fl_list */ > > > > > +#define for_each_file_lock(_fl, _head) list_for_each_entry(_fl, _head, fl_list) > > > > > + > > > > > > > > This causes a build warning for fs/ceph/ and fs/afs when > > > > !CONFIG_FILE_LOCKING. I'm about to fold the following diff into this > > > > patch. The diff looks a bit wonky but essentially I've moved > > > > lock_is_unlock(), lock_is_{read,write}(), locks_wake_up() and > > > > for_each_file_lock() out of the ifdef CONFIG_FILE_LOCKING: > > > > > > > > > > I sent a patch for this problem yesterday. Did you not get it? > > > > Whoops, probably missed it on the trip back from fosdem. > > I'll double check now. > > No worries. If you choose to go with your version, you can add: No, I took yours. :)