]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
lockdep: fixup checking of dir inode annotation
authorNamhyung Kim <namhyung@gmail.com>
Mon, 11 Oct 2010 13:38:00 +0000 (22:38 +0900)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Oct 2010 01:18:23 +0000 (21:18 -0400)
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 <namhyung@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/inode.c

index 3368abd64bb542b8a95d5f3d4149588dddb23bb3..4f0a67c54f8972b9e2f2000617a672bfefaa85a5 100644 (file)
@@ -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 */