diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-26 08:34:33 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-26 19:05:28 +0200 |
commit | 41c96486f238e6a545f52215f95fe69748abf603 (patch) | |
tree | 580a8706552a41a0e154b440bd7afd80a9e688da /fs/omfs | |
parent | btrfs: S_ISREG(mode) is not mode & S_IFREG... (diff) | |
download | linux-41c96486f238e6a545f52215f95fe69748abf603.tar.xz linux-41c96486f238e6a545f52215f95fe69748abf603.zip |
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>
Diffstat (limited to 'fs/omfs')
-rw-r--r-- | fs/omfs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |