Message ID | 20240131-flsplit-v3-43-c6129007ee8d@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-47330-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp94188dyc; Wed, 31 Jan 2024 15:40:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzJ8EEyGC8sN1+8MJK++MGLiJbLPucjJSgRqLCluyqX5ffszk7A4Xp+vazB93tiYuUMavl X-Received: by 2002:a62:b604:0:b0:6da:e7c2:42ca with SMTP id j4-20020a62b604000000b006dae7c242camr2914664pff.21.1706744414598; Wed, 31 Jan 2024 15:40:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706744414; cv=pass; d=google.com; s=arc-20160816; b=t4PuNMKfVCTOqjvlJnYY4F3C6GlwUr+e0yVvBV80ukCX+Qeg/p2RpwKiLu60C2mpVH zdz6Q8AswnrCrCJHZr0aXXmvMog8LDvKA0xBIX6VaXOBUc1ym3h/w5GFyAu/c8vx+qPY 6KHHz6kZNJFsYFRBmmzTOkbqNHVWZATQoklI8iBokPA8S5lp8tGyBe2Q98OzesMFmwha l97dSGZuU5T4hswlN7mFtc8Ed5RQXcVDApStMcjnZgySjda6cm+pCx/1jq6WKu19+umb Tmvqht4brgWBrv+3xH6NrWPwNVrpASVhLSWwP6k6d8ELM7soGofe/aZU26rFzhjY1ekp QhvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Gz0gytPUVeghye4eOCaSFkx/mtGNOk6il4kc2o9+n5s=; fh=GOrJxl0yvuWXcgKccLHFNVbG/+IERK/AnN3Axo2Dqmo=; b=MQoqlTHqzDMB0yIato/lr3godrGzyIPgMf8nAShAby5tNrWbi9GxjyyrfV4KVUHEVr snuxskFus+5Ef+OnRMOX4Emcw5CYJXYyhW/lNTymGcYgoSRiMdMWMSwkm5UGJ+3m8okq 2HHpgCgGyOOPYUutwLod9VyOalj+aIKo5oaZEEjLuotg/JsgmGica9XBS9braMoQ/Ql6 h23nMbRrnD3zQ+33d0/jbJRbao8SRy60U3/PHadPPZXliDuwcYYAg9hQSPqeP0eL1knu JHkwcum805MXazFdj6+ql9hy7Li5miB/b0/gRQyx24hE4Ck6aap/Sv/krPMgWqEy+fj7 /abw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nyz4BOiv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47330-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47330-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWpMZu6sxbOrHJjhu2QloVdW9GtV4QcuYj85Mf/lK9HcrtwzLZL5K8x43VxCqd9adn+t1ehE8OkS+nZ+w8CS+Lc8jtLUg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q19-20020a62ae13000000b006d9a6d5737dsi10593183pff.91.2024.01.31.15.40.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 15:40:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47330-ouuuleilei=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=Nyz4BOiv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47330-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47330-ouuuleilei=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 954E029DD7A for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 23:22:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4632F14D45C; Wed, 31 Jan 2024 23:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Nyz4BOiv" 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 C2A7014D426; Wed, 31 Jan 2024 23:05:07 +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=1706742308; cv=none; b=XT8dVb8rtsXqnPxifciIwJUlO2x4aGQhcqABWp2PoJdDoJZzWx7T04sONFI/E13PhIJ99SPnZ1hWr5hbpWChglm8BD8v3F8lXLib+ZtMpdobUeMoVT5uqfFENOwR3yHakfLL3FzTmh6ADJJVRkp9RNqhguWTrJYR7L5cCftX2IY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706742308; c=relaxed/simple; bh=zBEQAnXiMZJe4QRF33dUYq06POQWEY8Fz8nVDZKBnJM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=o2goLsEtgNdalyRXhF0S2qQVlnO4QTOvQ+9StX9373Qo2iWFpW7ut6GuH11gQMO4P+sj/SN07W9OgftkPGmU7+kNW3tq66dwPRHv7TRB+8ACGV48xx9pxg0HUbdwWwpjdfTFTyYryO3RAG+m8S+DriWnH+L7TRGcnATeHNu2KV4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Nyz4BOiv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55D61C43330; Wed, 31 Jan 2024 23:05:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706742307; bh=zBEQAnXiMZJe4QRF33dUYq06POQWEY8Fz8nVDZKBnJM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Nyz4BOivW44cbjphxKFgKghcs5rKHI5JuEZCoD7BBHArtmTFWt1/ZQA1jYFQl0W6w NJagd014rViw3KhRoWYfh8K1fLVL0N2VIfnl+JIQj6fuOFS/WETvmpNUfpAEFuVI2T gFKJu1CI1nG537UFvtSpraQYXXETen50FMKpFCSWSsStyGejkABG6ubWVMR5YZer7S I9h3HLzn32B0p6/vBKmuSmKbMdaB9D1XW5M84Vwse3oizaMsyz6De4tlSi+O0FBDUY DkJGVs0KJpv2mTTThV2fravipD1vFG1jJHG/TFpj7rulfta1LTFhfDZVJfPpyztUdu M2taDOVCnSMtw== From: Jeff Layton <jlayton@kernel.org> Date: Wed, 31 Jan 2024 18:02:24 -0500 Subject: [PATCH v3 43/47] ocfs2: adapt to breakup of struct file_lock Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240131-flsplit-v3-43-c6129007ee8d@kernel.org> References: <20240131-flsplit-v3-0-c6129007ee8d@kernel.org> In-Reply-To: <20240131-flsplit-v3-0-c6129007ee8d@kernel.org> To: Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Chuck Lever <chuck.lever@oracle.com>, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>, Eric Van Hensbergen <ericvh@kernel.org>, Latchesar Ionkov <lucho@ionkov.net>, Dominique Martinet <asmadeus@codewreck.org>, Christian Schoenebeck <linux_oss@crudebyte.com>, David Howells <dhowells@redhat.com>, Marc Dionne <marc.dionne@auristor.com>, Xiubo Li <xiubli@redhat.com>, Ilya Dryomov <idryomov@gmail.com>, Alexander Aring <aahringo@redhat.com>, David Teigland <teigland@redhat.com>, Andreas Gruenbacher <agruenba@redhat.com>, Neil Brown <neilb@suse.de>, Olga Kornievskaia <kolga@netapp.com>, Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>, Trond Myklebust <trond.myklebust@hammerspace.com>, Anna Schumaker <anna@kernel.org>, Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>, Joseph Qi <joseph.qi@linux.alibaba.com>, Steve French <sfrench@samba.org>, Paulo Alcantara <pc@manguebit.com>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Shyam Prasad N <sprasad@microsoft.com>, Namjae Jeon <linkinjeon@kernel.org>, Sergey Senozhatsky <senozhatsky@chromium.org>, Miklos Szeredi <miklos@szeredi.hu> Cc: 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, Jeff Layton <jlayton@kernel.org> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2028; i=jlayton@kernel.org; h=from:subject:message-id; bh=zBEQAnXiMZJe4QRF33dUYq06POQWEY8Fz8nVDZKBnJM=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBlutFzffLuLGCb6wJC3ZnImhz7hLMiQatYWsAWx A2TEcmrZqqJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZbrRcwAKCRAADmhBGVaC FbP4EACb3skq+/Ot6pcuM7Ni6QyiG4Ogfv4oMqQomznq5s5Hp3CwL2zAY3qSoehH5AMzK+KvRRS 6b00hs8OL13W/SF21Njq7Vy8gmAAh2OJhc0xG/Jb3aIoYbEeQU7giec5fzkTH/+Okc7c60UwbMh fY8VP066LimEoCSa7J30BMV90F52JuTc1M44K1Gw/+Aw+I7KidNtFeYwu1FpkJ0qVz9bIuSp5lq kR37bvbHD5pMvG0WyX7thsBaS3FBjfNfWqixezQOTIlurrwvGpQhIOYa/YL2hZn3Ft0otn+5ZER Sk/H8rsofIWQa2Q+obTxlZflAGw1dNSI7UkvyvXgxxrhBQXXMI1N+SB1FjMQBra0p7UF9mAITc+ vsLqkKD1Gp+bwfFtw/xhVGfmxPc+tyB1dsUs5/6aCLSjY8XQswmhT9Cy06G/jeMFyx2UVN3NgOf 8mPsDOdEqftE4xzC2rLo+UArgQBdWsPPfJspVvsGhzwrwrSp4WtLUc9MrdPIQDxj/ykqkDeLOVZ CwkXtXxXqKObLyzLRQl8tSNMwrmTnLHjRQqc54W3otiJVeVRVkctKIFvf9RGW1H5aYQhMkYDUH2 B0/wgcsV5hRBSQeMkYU/L5iDwxjB0yi3cqRiXSCnAntmakaXxUlxZXp7hfrSBd3Tx9alhkrhc0h y++bjy9bE9iqK/A== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789651230954458814 X-GMAIL-MSGID: 1789651230954458814 |
Series |
filelock: split file leases out of struct file_lock
|
|
Commit Message
Jeff Layton
Jan. 31, 2024, 11:02 p.m. UTC
Most of the existing APIs have remained the same, but subsystems that
access file_lock fields directly need to reach into struct
file_lock_core now.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/ocfs2/locks.c | 9 ++++-----
fs/ocfs2/stack_user.c | 1 -
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/ocfs2/locks.c b/fs/ocfs2/locks.c index 84ad403b5998..6de944818c56 100644 --- a/fs/ocfs2/locks.c +++ b/fs/ocfs2/locks.c @@ -8,7 +8,6 @@ */ #include <linux/fs.h> -#define _NEED_FILE_LOCK_FIELD_MACROS #include <linux/filelock.h> #include <linux/fcntl.h> @@ -54,8 +53,8 @@ static int ocfs2_do_flock(struct file *file, struct inode *inode, */ locks_init_lock(&request); - request.fl_type = F_UNLCK; - request.fl_flags = FL_FLOCK; + request.c.flc_type = F_UNLCK; + request.c.flc_flags = FL_FLOCK; locks_lock_file_wait(file, &request); ocfs2_file_unlock(file); @@ -101,7 +100,7 @@ int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl) struct inode *inode = file->f_mapping->host; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); - if (!(fl->fl_flags & FL_FLOCK)) + if (!(fl->c.flc_flags & FL_FLOCK)) return -ENOLCK; if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) || @@ -119,7 +118,7 @@ int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl) struct inode *inode = file->f_mapping->host; struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); - if (!(fl->fl_flags & FL_POSIX)) + if (!(fl->c.flc_flags & FL_POSIX)) return -ENOLCK; return ocfs2_plock(osb->cconn, OCFS2_I(inode)->ip_blkno, file, cmd, fl); diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index 39b7e47a8618..c11406cd87a8 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c @@ -9,7 +9,6 @@ #include <linux/module.h> #include <linux/fs.h> -#define _NEED_FILE_LOCK_FIELD_MACROS #include <linux/filelock.h> #include <linux/miscdevice.h> #include <linux/mutex.h>