From patchwork Wed May 4 16:46:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 569626 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A3DEC38A2B for ; Wed, 4 May 2022 17:17:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357892AbiEDRUJ (ORCPT ); Wed, 4 May 2022 13:20:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357287AbiEDRO6 (ORCPT ); Wed, 4 May 2022 13:14:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74F89546AD; Wed, 4 May 2022 09:58:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DD71E618D7; Wed, 4 May 2022 16:58:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98344C385A5; Wed, 4 May 2022 16:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683506; bh=io5qK08uf7Ho5pIz2sIZ6RVCb9Wt3d3tyHRZDjUXifg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tzUyLfa1fKHb33Qb58ybbH/TEF2We2vDo0NEqbqBKZZ/Lk9uGNmlkDO1UvbeVbDKr lis2k1zUIATXuXGAs7OV087oiIfKwINDbkG9hTdz78dC1PtQZtE8ugtZjxJsWVgYkP eNM3RhN+/jEbikBA15j4xgrepE+p9FgjLG+WClXg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Damien Le Moal , Johannes Thumshirn , Chaitanya Kulkarni , Hans Holmberg Subject: [PATCH 5.17 181/225] zonefs: Clear inode information flags on inode creation Date: Wed, 4 May 2022 18:46:59 +0200 Message-Id: <20220504153126.635564169@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153110.096069935@linuxfoundation.org> References: <20220504153110.096069935@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Damien Le Moal commit 694852ead287a3433126e7ebda397b242dc99624 upstream. Ensure that the i_flags field of struct zonefs_inode_info is cleared to 0 when initializing a zone file inode, avoiding seeing the flag ZONEFS_ZONE_OPEN being incorrectly set. Fixes: b5c00e975779 ("zonefs: open/close zone on file open/close") Cc: Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hans Holmberg Signed-off-by: Greg Kroah-Hartman --- fs/zonefs/super.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -1155,6 +1155,7 @@ static struct inode *zonefs_alloc_inode( inode_init_once(&zi->i_vnode); mutex_init(&zi->i_truncate_mutex); zi->i_wr_refcnt = 0; + zi->i_flags = 0; return &zi->i_vnode; }