From mboxrd@z Thu Jan 1 00:00:00 1970 From: Namhyung Kim Subject: [PATCH] lockdep: fixup checking of dir inode annotation Date: Mon, 11 Oct 2010 22:38:00 +0900 Message-ID: <1286804280-5706-1-git-send-email-namhyung@gmail.com> Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Peter Zijlstra , Ingo Molnar Return-path: Received: from mail-pz0-f46.google.com ([209.85.210.46]:45902 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754315Ab0JKNiL (ORCPT ); Mon, 11 Oct 2010 09:38:11 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Since inode->i_mode shares its bits for S_IFMT, S_ISDIR should be used to distinguish whether it is a dir or not. Signed-off-by: Namhyung Kim --- fs/inode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 8646433..db58813 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -663,7 +663,7 @@ EXPORT_SYMBOL(new_inode); void unlock_new_inode(struct inode *inode) { #ifdef CONFIG_DEBUG_LOCK_ALLOC - if (inode->i_mode & S_IFDIR) { + if (S_ISDIR(inode->i_mode)) { struct file_system_type *type = inode->i_sb->s_type; /* Set new key only if filesystem hasn't already changed it */ -- 1.7.0.4