VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Al Viro <viro@zeniv.linux.org.uk> 2011-07-26 02:34:33 -0400 committer: Al Viro <viro@zeniv.linux.org.uk> 2011-07-26 13:05:28 -0400 commit: 41c96486f238e6a545f52215f95fe69748abf603 parent: 569254b0cc4e125ffde48780b215ecaf5f72bbf4
Commit Summary:
omfs: fix (mode & S_IFDIR) abuse
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c
index 3b8d3979e03b..98e544274390 100644
--- a/fs/omfs/dir.c
+++ b/fs/omfs/dir.c
@@ -93,7 +93,7 @@ int omfs_make_empty(struct inode *inode, struct super_block *sb)
 
 	memset(bh->b_data, 0, sizeof(struct omfs_inode));
 
-	if (inode->i_mode & S_IFDIR) {
+	if (S_ISDIR(inode->i_mode)) {
 		memset(&bh->b_data[OMFS_DIR_START], 0xff,
 			sbi->s_sys_blocksize - OMFS_DIR_START);
 	} else