Message ID | 20211025192746.66445-14-krisman@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-fsdevel-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAEE2C433EF for <linux-fsdevel@archiver.kernel.org>; Mon, 25 Oct 2021 19:33:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A39F561211 for <linux-fsdevel@archiver.kernel.org>; Mon, 25 Oct 2021 19:33:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235364AbhJYTf3 (ORCPT <rfc822;linux-fsdevel@archiver.kernel.org>); Mon, 25 Oct 2021 15:35:29 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:58614 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235787AbhJYTcc (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Mon, 25 Oct 2021 15:32:32 -0400 Received: from localhost (unknown [IPv6:2804:14c:124:8a08::1002]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: krisman) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 1431C1F41CDE; Mon, 25 Oct 2021 20:29:23 +0100 (BST) From: Gabriel Krisman Bertazi <krisman@collabora.com> To: amir73il@gmail.com, jack@suse.com Cc: djwong@kernel.org, tytso@mit.edu, david@fromorbit.com, dhowells@redhat.com, khazhy@google.com, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, Gabriel Krisman Bertazi <krisman@collabora.com>, kernel@collabora.com, Jan Kara <jack@suse.cz> Subject: [PATCH v9 13/31] fanotify: Support null inode event in fanotify_dfid_inode Date: Mon, 25 Oct 2021 16:27:28 -0300 Message-Id: <20211025192746.66445-14-krisman@collabora.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211025192746.66445-1-krisman@collabora.com> References: <20211025192746.66445-1-krisman@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org |
Series |
file system-wide error monitoring
|
expand
|
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index c620b4f6fe12..397ee623ff1e 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -452,7 +452,7 @@ static struct inode *fanotify_dfid_inode(u32 event_mask, const void *data, if (event_mask & ALL_FSNOTIFY_DIRENT_EVENTS) return dir; - if (S_ISDIR(inode->i_mode)) + if (inode && S_ISDIR(inode->i_mode)) return inode; return dir;