From patchwork Tue Sep 8 15:25:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 264298 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 657AAC433E2 for ; Tue, 8 Sep 2020 17:58:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D027206E7 for ; Tue, 8 Sep 2020 17:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599587938; bh=vQ8XEpwc50stmnvkX4zSfdoub4klCXtqsUrmoDbVrO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2vHQ3R8DFvsDtYXro7zOP+T2/yBi4HsIkvO2FgGc2mkKRmDB6a8hm5wojYH7HRAHn 2jV6s9doHXOi/4dnxgbnbsfOXc7AYZEx9fVOBb/qv35hAL4o4/KhYR1Gpb4qil+hyr q6FVxCZdvWmllL5rYZNudvob95ufRQdNHn9+yoic= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732281AbgIHR6w (ORCPT ); Tue, 8 Sep 2020 13:58:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:56080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731533AbgIHQMM (ORCPT ); Tue, 8 Sep 2020 12:12:12 -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 6E4B1247D6; Tue, 8 Sep 2020 15:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580293; bh=vQ8XEpwc50stmnvkX4zSfdoub4klCXtqsUrmoDbVrO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYyGvGZTFV+tkbFNQ8BRNIPvaaAHo8BTZw1U1CpvmUGq8itXKK6gAGztUrjBJvKVv oHXBxBY2R87veBcBeUvlVChxvTqWRvm9uvUYmuuhLa97vXbVrRDKGc1hs5stOje44U lI0wHhyT39XJBg0tiOEtjgSB+JWBH22T+GZFfeSA= 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.14 07/65] ceph: dont allow setlease on cephfs Date: Tue, 8 Sep 2020 17:25:52 +0200 Message-Id: <20200908152217.403651735@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152217.022816723@linuxfoundation.org> References: <20200908152217.022816723@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 6d653235e323b..1f873034f4691 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1728,6 +1728,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,