Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1059232pxk; Mon, 31 Aug 2020 08:43:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuRf+tvA0DYEAd9rD9nL7Sg613EDHrEz22B08rjA5cdGBCAeeCiBgJNmSro0cQJeAzmXOp X-Received: by 2002:a50:aa94:: with SMTP id q20mr1703136edc.119.1598888593878; Mon, 31 Aug 2020 08:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598888593; cv=none; d=google.com; s=arc-20160816; b=edqV6ZaUvXoQaToIRqrnuho8yqXbDJl1N7tE4f8h6I/IIT9k3yrJWePObSCahDL0es 9csCBVrUhogKznJgQZeesDjfhA6jt0qKEnZTzvgygnl2e7618lDFCuCvq3E5zSqgwEGE PnHbIRvEyvbGt90bX7AEM1pmMrZzoC81KB2zsyzNHyLTgeHmeQ2Y0Ouc/Omn4MfhroTW k9YoQtvTClopnyWHBWtdXxvGbU5oSx4Rc558mEeUX/naMKYWuyyz/BUyTyeJVGYfEtmo tOwriF1qakozEA/2FKLmsjhf7AALQsn5HA3Ihn3KWHFcIZfC1IwnmUS+wRWdbYrEafxs L6sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ibshts9mTjdSlyg5GDc1ClQHEH4mP5w0dd7tskgK1vg=; b=iNOA0sVJ3JBmwM+oxVWBRxuKSsHXKnEdFeLjPsKbqUV3fRHqzdPKDZ5ZljSTCcECqr lCLtfVi0LPq/U3Ut+d+YgfXf9DZvC5g/4PoFQJ6B7vv6/4fAbodmnW2kK86iZa3aHqXy q6y/Tdkg6qdLdri78F97Z4ub3RWCstGNoU2oYEusyG4lfUC1PB0q4fQMgOjnTIQGQbVa 5sihd7a4khAJs3tZfwjDPx/aFpdPMZnfXQjbE0kmFx2TY42hX3TBH2+X0RDp2gSMLGFw aGaL1nCCtLVHLPNG+GcJV4X3dde99Qfn5lzgX04KUX5Cg1rcHZP90MYF7kiXDVWmLB32 cR+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SpUsS9h5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si5269939edt.468.2020.08.31.08.42.50; Mon, 31 Aug 2020 08:43:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SpUsS9h5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729204AbgHaPjO (ORCPT + 99 others); Mon, 31 Aug 2020 11:39:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:39480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728550AbgHaPaO (ORCPT ); Mon, 31 Aug 2020 11:30:14 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7AC2B20767; Mon, 31 Aug 2020 15:30:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598887814; bh=enPaakcvPoIVnN5PoXGGX7Ex4yMClA/+TEGHC+05xf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SpUsS9h59eRyWCiWfYxY1/llhcIZi+OTLbzc2BHD3mOaxPYzliIO4wMIjWYd3Yfwr aliK2vMe8VHdJ8doAltYZ8NVDC+1FdJGvDuglwX5XEbTUZsTmQGjG6TOXsPzvQ8UGN ZicyYFumvibmi+20QgZbdgvEq7OCAfjNCAKCC5Qw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeff Layton , Ilya Dryomov , Sasha Levin , ceph-devel@vger.kernel.org Subject: [PATCH AUTOSEL 5.8 26/42] ceph: don't allow setlease on cephfs Date: Mon, 31 Aug 2020 11:29:18 -0400 Message-Id: <20200831152934.1023912-26-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831152934.1023912-1-sashal@kernel.org> References: <20200831152934.1023912-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 26172bb90a459..c53c1499f7c58 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -2506,6 +2506,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, -- 2.25.1