Skip to contentSkip to conversation

lockdep: fixup checking of dir inode annotation

PATCH New Namhyung Kim 1 participant 1 message Oct 11, 2010 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lockdep: fixup checking of dir inode annotation

Since inode->i_mode shares its bits for S_IFMT, S_ISDIR should be used to distinguish whether it is a dir or not.

---
 fs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/inode.c +1 -1
index 8646433..db58813 100644
@@ -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 */
Signature · 1 line
1.7.0.4