Commit 41c96486f238e6a545f52215f95fe69748abf603

Authored by Al Viro
1 parent 569254b0cc

omfs: fix (mode & S_IFDIR) abuse

granted, on a filesystem that has only regular files and directories
it happens to work, but really should be S_ISDIR(mode)...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -93,7 +93,7 @@
93 93  
94 94 memset(bh->b_data, 0, sizeof(struct omfs_inode));
95 95  
96   - if (inode->i_mode & S_IFDIR) {
  96 + if (S_ISDIR(inode->i_mode)) {
97 97 memset(&bh->b_data[OMFS_DIR_START], 0xff,
98 98 sbi->s_sys_blocksize - OMFS_DIR_START);
99 99 } else