From patchwork Tue Sep 8 15:24:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 264270 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1450CC43461 for ; Tue, 8 Sep 2020 18:17:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0FFF2080C for ; Tue, 8 Sep 2020 18:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599589035; bh=4XkrdDeFEOZ4co9dRBLodeNxMDeozRHraHeW4d+NbVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dbd9h0B3i8pNJmIdX7CSgJEtWbuzox4S3Ln14ddloS+TINTylBgOgdPQ8wVbEc8mo qfCYvUdjuBuAGM91xsQfMTFGy44fxxm09SszQIdCgY710NY7ShCeIZS8o1F8aPm6p2 uqo1IoIOwChCHn3VCHNcwXcvBMz9YD/lbOWF+7uI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731698AbgIHSQ5 (ORCPT ); Tue, 8 Sep 2020 14:16:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:56082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731059AbgIHQLL (ORCPT ); Tue, 8 Sep 2020 12:11:11 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5CBD2247D0; Tue, 8 Sep 2020 15:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579748; bh=4XkrdDeFEOZ4co9dRBLodeNxMDeozRHraHeW4d+NbVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f+DS3aUvaQ6h6adwAHiTrOaHVKl883UoD+H84tFnlCxBGxuvrZ43lMMLsPi6EB4Zd VEk2ID6DTcGoUQQgjA5bkwpbfuelTyODxJTPBgG7jm0+quPw8mdUQCyBUwCrrNNEbA y2md9O/+cpdUjtqqa0eUpFqfe8n9lHGX79Qa+IWI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeff Layton , Ilya Dryomov , Sasha Levin Subject: [PATCH 5.4 011/129] ceph: dont allow setlease on cephfs Date: Tue, 8 Sep 2020 17:24:12 +0200 Message-Id: <20200908152230.261215279@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152229.689878733@linuxfoundation.org> References: <20200908152229.689878733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jeff Layton [ Upstream commit 496ceaf12432b3d136dcdec48424312e71359ea7 ] Leases don't currently work correctly on kcephfs, as they are not broken when caps are revoked. They could eventually be implemented similarly to how we did them in libcephfs, but for now don't allow them. [ idryomov: no need for simple_nosetlease() in ceph_dir_fops and ceph_snapdir_fops ] Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin --- fs/ceph/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 4a6b14a2bd7f9..a10711a6337af 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -2198,6 +2198,7 @@ const struct file_operations ceph_file_fops = { .mmap = ceph_mmap, .fsync = ceph_fsync, .lock = ceph_lock, + .setlease = simple_nosetlease, .flock = ceph_flock, .splice_read = generic_file_splice_read, .splice_write = iter_file_splice_write,