From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBA0AC433EF for ; Wed, 8 Sep 2021 14:29:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8F1561154 for ; Wed, 8 Sep 2021 14:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351942AbhIHOaa (ORCPT ); Wed, 8 Sep 2021 10:30:30 -0400 Received: from hurricane.elijah.cs.cmu.edu ([128.2.209.191]:41500 "EHLO hurricane.elijah.cs.cmu.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351936AbhIHOa3 (ORCPT ); Wed, 8 Sep 2021 10:30:29 -0400 Received: from jaharkes by hurricane.elijah.cs.cmu.edu with local (Exim 4.92) (envelope-from ) id 1mNyAO-0004r4-Px; Wed, 08 Sep 2021 10:03:08 -0400 From: Jan Harkes To: Andrew Morton Cc: Jan Harkes , linux-fsdevel@vger.kernel.org Subject: [PATCH 4/9] coda: Avoid flagging NULL inodes Date: Wed, 8 Sep 2021 10:03:03 -0400 Message-Id: <20210908140308.18491-5-jaharkes@cs.cmu.edu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210908140308.18491-1-jaharkes@cs.cmu.edu> References: <20210908140308.18491-1-jaharkes@cs.cmu.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Somehow we hit a negative dentry in coda_rename even after checking with d_really_is_positive. Maybe something raced and turned the new_dentry negative while we were fixing up directory link counts. Signed-off-by: Jan Harkes --- fs/coda/coda_linux.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/coda/coda_linux.h b/fs/coda/coda_linux.h index e7b27754ce78..3c2947bba5e5 100644 --- a/fs/coda/coda_linux.h +++ b/fs/coda/coda_linux.h @@ -83,6 +83,9 @@ static __inline__ void coda_flag_inode(struct inode *inode, int flag) { struct coda_inode_info *cii = ITOC(inode); + if (!inode) + return; + spin_lock(&cii->c_lock); cii->c_flags |= flag; spin_unlock(&cii->c_lock); -- 2.25.1