From patchwork Fri Sep 11 12:45:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 309770 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 14EA6C433E2 for ; Fri, 11 Sep 2020 17:35:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB162221E7 for ; Fri, 11 Sep 2020 17:35:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599845750; bh=wo/9jfUs/QsfWHN0aWZWBzIi8v87Qpm/6HXW9VcwsdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HIcE0DHPUAIp0/mln3cBJHnYBa/dnZkzeLutqPk2616N6ntYl5deMuGBHwaCdpjG2 hKYt0nYxPnvv0v6inZ8pyazHaW14uKU8KftctZz4HQLC59MwxsfgzS8ax3am5lse1m ocXU2Mg2Zt5Ge3YDaoIusQ954TWCBnHJHDPbHOpo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726230AbgIKRe0 (ORCPT ); Fri, 11 Sep 2020 13:34:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:49260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726050AbgIKMye (ORCPT ); Fri, 11 Sep 2020 08:54:34 -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 4187022226; Fri, 11 Sep 2020 12:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599828836; bh=wo/9jfUs/QsfWHN0aWZWBzIi8v87Qpm/6HXW9VcwsdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j9VgQ+YiaSOt3ivWG0/baDmBcrg/vyXBC8xyq7QCpPc2L+K12KWYn4rIK0IjL0R7v OeTIwbngJtV8nSaTA6pzX2n2Mm/UlZdtArOHqUZFK5LoS6mJiUOcBmCZwkZXSxzUoP AR1c0dOlz1GEKMsNbbQnTCuOj/P60IjcPEfZ1Pto= 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.4 06/62] ceph: dont allow setlease on cephfs Date: Fri, 11 Sep 2020 14:45:49 +0200 Message-Id: <20200911122502.716707091@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911122502.395450276@linuxfoundation.org> References: <20200911122502.395450276@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 c8222bfe1e566..3e6ebe40f06fb 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1433,6 +1433,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,