Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2383481ybi; Sun, 9 Jun 2019 10:21:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLaaXtrl98N4/OUjhZEaO+vTpSdfIEBRSscB0Hyl8MtOR3OeOxCaVVT0yPTAdVtbpt9JJK X-Received: by 2002:a17:902:bd06:: with SMTP id p6mr65460532pls.112.1560100914185; Sun, 09 Jun 2019 10:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560100914; cv=none; d=google.com; s=arc-20160816; b=izEhwrB8+3u8d0ZbzL0nGTE04MzXphAhL2p5qon2uLavPuDWGdyVtD5Xv7UWabv8hq aJQUvxRA95ZTipLEFz8gMHWZAjtxBaiXozzq6D1WxZYoR2oSy53OfCp4j/7XatMKcyIC i655l6b5aCl+yNrUn564w8gV7iQ/wxjsXint5nlF1kWxydgeWNx1m1hDCvMFwX+a6Zq6 s4jYJcGYwL2Oxa98pACe7k6QTmHxFeX4kyhrvooTBpb6Oku2UoP5ymEQNI35nha71aOm BUyR0VHEFjtYDpZSIe36KO6e9gGScVpvRU7SwIxaPOmvECI35wAjsq6iLkiZ4L/lwgeF e+VA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DusbMsHfoF7oY0YAVTxRB0hLEd4Vw0nnFHkLMYhMhjY=; b=xZ39a1qq/ct6Vixq6uncbsPQtgEssOUEbZCVOEjFrUWYgUPTml4QOKn5ujfE1ARfkR uVlvbwwm47qR+lPS6i6yXg6sldW5ElmlACt9IyE7CsTvJnyusnczSd1aIWsMaAaJhLaK 5JvLlb1D1wMejb0mNBTmo/uC4Ji2s7AZ2VqQcvTFiEu3avHQUxdudViHsvbQNQBzAwfP X1GtCYfh/7WR36PvbI1Sl28KxHivKWfH29u/keBbrRMzMhmK7capCoq2QN4FCZNM++Wr xl6cGA79Gi6sv8X7l8AZsQMum2kIyWiI2uAJYduPGawqlCt7SuG5QjWcxb4VoOU3IpqA Fn1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GlbIGjRr; 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 w65si6644187pgw.6.2019.06.09.10.21.38; Sun, 09 Jun 2019 10:21:54 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=GlbIGjRr; 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 S1729658AbfFIQsF (ORCPT + 99 others); Sun, 9 Jun 2019 12:48:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:46894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731064AbfFIQsB (ORCPT ); Sun, 9 Jun 2019 12:48:01 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 28545205ED; Sun, 9 Jun 2019 16:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560098880; bh=j8+0werx+ueP1SttlAq1Hd3V5fyJGBI9OfJYTnaDHTA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GlbIGjRr2hFcDYMJ4vGzEe9cmc3sx4EXaC1tyB3/i+BSklDrY5CUXNaZDcV0kDpfv CQoYGwNswGKZKJhJ/vwj/87cQ08b1jJorrvmjmgA6JvCqqxZBa3UD39hNfNAK7Fumu 6Dcl+JT50nZLe3fYcdvEK9iTmd+DQMboZf/HJBbU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kbuild test robot , Dan Carpenter , Liu Bo , Miklos Szeredi Subject: [PATCH 4.19 22/51] fuse: fallocate: fix return with locked inode Date: Sun, 9 Jun 2019 18:42:03 +0200 Message-Id: <20190609164128.380174810@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190609164127.123076536@linuxfoundation.org> References: <20190609164127.123076536@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miklos Szeredi commit 35d6fcbb7c3e296a52136347346a698a35af3fda upstream. Do the proper cleanup in case the size check fails. Tested with xfstests:generic/228 Reported-by: kbuild test robot Reported-by: Dan Carpenter Fixes: 0cbade024ba5 ("fuse: honor RLIMIT_FSIZE in fuse_file_fallocate") Cc: Liu Bo Cc: # v3.5 Signed-off-by: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- fs/fuse/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -2981,7 +2981,7 @@ static long fuse_file_fallocate(struct f offset + length > i_size_read(inode)) { err = inode_newsize_ok(inode, offset + length); if (err) - return err; + goto out; } if (!(mode & FALLOC_FL_KEEP_SIZE))