Skip to content

Commit

Permalink
lockdep: fixup checking of dir inode annotation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Namhyung Kim authored and Al Viro committed Oct 26, 2010
1 parent 306fb09 commit a3314a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a3314a0

Please sign in to comment.