Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3320367imu; Sun, 11 Nov 2018 12:17:57 -0800 (PST) X-Google-Smtp-Source: AJdET5f3ibR5ks0V6bmkgh3KMWelkPh1Ad1cJE0VL639F9RWGaUgE8M6EhVFAvqOfQ9ZAG7+ILbX X-Received: by 2002:a62:6981:: with SMTP id e123-v6mr17369287pfc.104.1541967477891; Sun, 11 Nov 2018 12:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541967477; cv=none; d=google.com; s=arc-20160816; b=oLPPJTHm1jRRaNIKkXJvNprSwNHw+9n3MUu7u1J2wBmIYQFa18pqiAkvptMKjBWTNa Ju7vSa8JbyKqc14XFbe0d8I57IzdEE3BZhPROwhjY40XpXqReesT+hmWRpam5hJD129J b66Rciv/vHoZflmW6v+PReWyxBks75O3SM8qoLyCfEm9Y1SePlsWtHKIg5x3JEuQjTWM 4Iak1Qqhm546FRanI6hn7Zhy/93B406PS7O5zINOMViyWO3TSJwPycq9Kn6gceA3OQpM N7/lYPvAz2ZMCVuyjv4zMmkR9nseCNUei/gafvBu+ZXD4ko8HczYYQGmqIQ0CeaE1JOG lxvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=Ny+FCsk+SJSk39khf9eds9sl0VKW6WAQ60HsLM63HHg=; b=Q4Dk3GRjffM9YnKALauxWNRS5fJQo7elFoUs+mKI3VnQivVHhYa0L0L+EzojXuEQeW YueqXQm1wPKNm9G2MAN+DI4KHfRhnNcYWsgzFrTb4I0cle/GWPhdnUwmq65JoPU+2mPs gDypSz+Ov+w+P3OjZIsxmtlaspUIhLPTehdmz6O1fwBsTW9hGkPUnJcU0dObgdapb/Jm QyLOJrhw//0/aULKUj4Eyp80ojHGs1+gX6oHJ4UNSVqNPeKqZX9IfLc26RGZnRjz2UtG 49z+NKU1pE3sc/cMKhfOKS3kwNjZNdB2m/WpAzv75DLhE09jKhjNXYBuA5G2Tc1OcioP D/zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y35-v6si14024349pgl.14.2018.11.11.12.17.42; Sun, 11 Nov 2018 12:17:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731944AbeKLGGK (ORCPT + 99 others); Mon, 12 Nov 2018 01:06:10 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:53196 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730491AbeKLGGJ (ORCPT ); Mon, 12 Nov 2018 01:06:09 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvtB-0000oF-RM; Sun, 11 Nov 2018 19:59:22 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsO-0001Pd-O9; Sun, 11 Nov 2018 19:58:32 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Theodore Ts'o" , "Jan Kara" , "Amir Goldstein" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 045/366] vfs: add the sb_start_intwrite_trylock() helper In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Amir Goldstein commit 0c8e3fe35db9b66ae0030849545030ec7c0fc45c upstream. Needed by ext4 to test frozen fs before updating s_last_mounted. Signed-off-by: Amir Goldstein Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Signed-off-by: Ben Hutchings --- include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1389,6 +1389,11 @@ static inline void sb_start_intwrite(str __sb_start_write(sb, SB_FREEZE_FS, true); } +static inline int sb_start_intwrite_trylock(struct super_block *sb) +{ + return __sb_start_write(sb, SB_FREEZE_FS, false); +} + extern bool inode_owner_or_capable(const struct inode *inode);