From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7D3415CAD for ; Tue, 8 Nov 2022 13:56:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1A44C433C1; Tue, 8 Nov 2022 13:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1667915804; bh=xhf3V3usteqzhdmAOjcupzhmqLznPh5V9UdDIlgfDXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P7LYx+2vTgziTIyfcb0Qtu2sWY88NnkrnJptK54sYsO0FKMHy3IGkDo7I02FY+XP1 20f8z/fl9h1/CLHUqo9REsZq1xbB3aLa2U9zZvfpWvXPl01NRmbEfDDGXit1LPdFuH KaH0TU86KUQyhleFyFKuAB2A7EPlG2Ij12FJsw5k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Miklos Szeredi Subject: [PATCH 5.10 096/118] fuse: add file_modified() to fallocate Date: Tue, 8 Nov 2022 14:39:34 +0100 Message-Id: <20221108133344.861503621@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221108133340.718216105@linuxfoundation.org> References: <20221108133340.718216105@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Miklos Szeredi commit 4a6f278d4827b59ba26ceae0ff4529ee826aa258 upstream. Add missing file_modified() call to fuse_file_fallocate(). Without this fallocate on fuse failed to clear privileges. Fixes: 05ba1f082300 ("fuse: add FALLOCATE operation") Cc: Signed-off-by: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- fs/fuse/file.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -3311,6 +3311,10 @@ static long fuse_file_fallocate(struct f goto out; } + err = file_modified(file); + if (err) + goto out; + if (!(mode & FALLOC_FL_KEEP_SIZE)) set_bit(FUSE_I_SIZE_UNSTABLE, &fi->state);