Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41c96486 authored by Al Viro's avatar Al Viro
Browse files

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 569254b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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