From patchwork Tue Sep 8 15:25: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: 264237 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=unavailable 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 68076C2BC11 for ; Tue, 8 Sep 2020 18:37:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30A602080C for ; Tue, 8 Sep 2020 18:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599590250; bh=YgEmgGLPuUW4I8j1gag94hXTFYWL8ZL/iKMTK9WHkEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=IQgUD/0TIeFarAPkQWzRT8rm3GmyDSC+S1zvqrmkbUtyFmurGrno7Yx3WRoexvtXR 2QvR03Yh5h1stGiu4RnfGIgGWBM+VolnVTMXMdZQMvllO59u7EpLbYFYv9ThW5uPtb RWklSH0N3ZkAwupaHwzkmxs6Z9AbKbcch3Gb2pMo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731558AbgIHSgq (ORCPT ); Tue, 8 Sep 2020 14:36:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:56078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731321AbgIHQJD (ORCPT ); Tue, 8 Sep 2020 12:09:03 -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 99C292415A; Tue, 8 Sep 2020 15:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580153; bh=YgEmgGLPuUW4I8j1gag94hXTFYWL8ZL/iKMTK9WHkEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WOBejxyoXxUAXsEtXqVQkb3S7mkgBlGsVH+85uK1YN3fBQOfOtXYXz/dypEOLpEb+ wTvbFTeROadQE/Ik1yGo2mkHD6qZ2JKToTea679SWzLP8LX0M9/1+t3aEey9QSQkkG t17mNnQUGCC3yYW1gbURrJyU8VcY/aioo9CRb878= 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 4.19 11/88] ceph: dont allow setlease on cephfs Date: Tue, 8 Sep 2020 17:25:12 +0200 Message-Id: <20200908152221.656418367@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152221.082184905@linuxfoundation.org> References: <20200908152221.082184905@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 faca455bd3c69..4ce2752c8b71c 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1819,6 +1819,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,