From nobody Sun Feb 8 19:02:58 2026 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 CB98D3033FF; Thu, 8 Jan 2026 17:15:36 +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=1767892536; cv=none; b=GaiWT4km/+vd1IGAM+KB1xnTiQg1Qo0vgzt2PfHiniU0q0oZPFPoU4aF3tu0DZZ6sDnjE3N7yYzT8namp/eiN02bx7ynzRPppnup1htmh8iJyIq9KBAr5F65dJUmxVtKHgL4tFVwSUQN2aXjP3Prz3oAYTIG29qBnh18FMNRxRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767892536; c=relaxed/simple; bh=MiPWr2DLJcKasX6F9v8+9rGglnlyvJqPKW48zd1al60=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jyu7+3RbQpzfP+ckTmp3cy601oCHVErZmUWkWLDqRcrk1BfgjNE+V13r5JkKCDtPrVCnMsyVoti5VBGiPLNnUG+wFEUgQOKnGsL6fZlPZnfW9L8CciSOdhaPbDvT6VfbulcwC8j2iLvlAb+g6gBNefLinFRsoKDWF413z3aCUvE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FEfgxOSR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FEfgxOSR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30428C19423; Thu, 8 Jan 2026 17:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767892536; bh=MiPWr2DLJcKasX6F9v8+9rGglnlyvJqPKW48zd1al60=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FEfgxOSR26Tj6ECCXQ1kDI71xuD1hXG0pdgsfNZC4qjP9PM5lbfSx+Yybs1gCcecZ 5xVezzMwDcSNmCAOhMvgtKsCodYaQQ0THMfjeYU1Lka0ZfBQvNJSo7ZROk/8DWqqwS z9CfvD4AgySuAldM2dO7tTufE31f/BCPAdnxWn1/LB9kJnwnj1jV/Nw1ca2KACETGl J8f4IuU7G8YKWo7cRmlJQR4C0vPm9DRtuy04I5l4PODkstZAHL3jw8Nx1K9gAKC3OK YiODwtzqw2h8Mvyvp8pwAs4PfIZ4y1YWFa7ryDGScMUbzDbIQyzQGIbkZGDOaQEX+r xeKOdpkRHCqKw== From: Jeff Layton Date: Thu, 08 Jan 2026 12:13:10 -0500 Subject: [PATCH 15/24] ocfs2: add setlease file operation Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260108-setlease-6-20-v1-15-ea4dec9b67fa@kernel.org> References: <20260108-setlease-6-20-v1-0-ea4dec9b67fa@kernel.org> In-Reply-To: <20260108-setlease-6-20-v1-0-ea4dec9b67fa@kernel.org> To: Luis de Bethencourt , Salah Triki , Nicolas Pitre , Christoph Hellwig , Jan Kara , Anders Larsen , Alexander Viro , Christian Brauner , David Sterba , Chris Mason , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , Jan Kara , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , David Woodhouse , Richard Weinberger , Dave Kleikamp , Ryusuke Konishi , Viacheslav Dubeyko , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Miklos Szeredi , Amir Goldstein , Phillip Lougher , Carlos Maiolino , Hugh Dickins , Baolin Wang , Andrew Morton , Namjae Jeon , Sungjong Seo , Yuezhang Mo , Chuck Lever , Alexander Aring , Andreas Gruenbacher , Jonathan Corbet , "Matthew Wilcox (Oracle)" , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , Xiubo Li , Ilya Dryomov , Trond Myklebust , Anna Schumaker , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM , Hans de Goede Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, gfs2@lists.linux.dev, linux-doc@vger.kernel.org, v9fs@lists.linux.dev, ceph-devel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, Jeff Layton X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1853; i=jlayton@kernel.org; h=from:subject:message-id; bh=MiPWr2DLJcKasX6F9v8+9rGglnlyvJqPKW48zd1al60=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBpX+W8O17HuY23tKG5Hc516pzPRtZ6MOWS5N7vz r/iJxDtMHOJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCaV/lvAAKCRAADmhBGVaC Fa41D/9uuWhzztHYPgXgRluKnu7erDAhmYdtz6gCOWZcNAGtLmln17MgKeXnmkqDLMrPGVckwT4 fC7PobhFhcSNz2sSkcjk425Ir4n/1vzlHrGwFkpJLw4Kn2fjqQnx7gF8IbKic0lGeIbkIQbiv/M 8jFiA/irOYflPM9HaGteXeTCHJ8i0+ULeKKhr/udChrv8wCSN/dIEHMDqryp0IfOtpmJQTvb5RZ 3HCC4ofBYEz4ZCwq3xOjBjH9yLnbP9AIyEGC2LegAIND0PfwLhjS46AnEIEsUDiaDbhbzFxL134 48fiomWRdRAG+WQ+FJmxb6WzuE5z5JyudmKfckYinC3ZMkz+qNgDfidFdXNBevMLS2ukjoWJ+iJ 2EfSfdIaSUtE9amWUXmyMljqiLZWlHGyTMebwgN+VoRxnvGxD3vd0+HDPL0R7kJzKhsfgoRwH2n Dgdq4fET9XNtzIN9TzuFmn3ga2hYH6AG+x8d4Ll+Nk0C2jMtDJZZI57nFOVXELVh+mTrTvljKih nvP/dVB9FoRi/l1JWdbfaX74VqUwinlSeT/iqLJucuPyQG0GWP6nBGRB6iYgcNBqJXT2kVB0ats dVPUdyWpL93BCT7a1h/PdHaO2xKWw4Phq16fB9qNI1evyBT5qrdO1Ol8oCTrYo/VZNl7rhK29IJ 9CXrYp95PfaAsQw== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Add the setlease file_operation to ocfs2_fops, ocfs2_dops, ocfs2_fops_no_plocks, and ocfs2_dops_no_plocks, pointing to generic_setlease. A future patch will change the default behavior to reject lease attempts with -EINVAL when there is no setlease file operation defined. Add generic_setlease to retain the ability to set leases on this filesystem. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara --- fs/ocfs2/file.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 732c61599159ccb1f8fbcbb44e848f78678221d9..ed961a854983d5e7abe935e160e= 3029c48e6fca4 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -2823,6 +2824,7 @@ const struct file_operations ocfs2_fops =3D { .fallocate =3D ocfs2_fallocate, .remap_file_range =3D ocfs2_remap_file_range, .fop_flags =3D FOP_ASYNC_LOCK, + .setlease =3D generic_setlease, }; =20 WRAP_DIR_ITER(ocfs2_readdir) // FIXME! @@ -2840,6 +2842,7 @@ const struct file_operations ocfs2_dops =3D { .lock =3D ocfs2_lock, .flock =3D ocfs2_flock, .fop_flags =3D FOP_ASYNC_LOCK, + .setlease =3D generic_setlease, }; =20 /* @@ -2871,6 +2874,7 @@ const struct file_operations ocfs2_fops_no_plocks =3D= { .splice_write =3D iter_file_splice_write, .fallocate =3D ocfs2_fallocate, .remap_file_range =3D ocfs2_remap_file_range, + .setlease =3D generic_setlease, }; =20 const struct file_operations ocfs2_dops_no_plocks =3D { @@ -2885,4 +2889,5 @@ const struct file_operations ocfs2_dops_no_plocks =3D= { .compat_ioctl =3D ocfs2_compat_ioctl, #endif .flock =3D ocfs2_flock, + .setlease =3D generic_setlease, }; --=20 2.52.0