vfs: add S_IFMT mask
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
260ed8a013
commit
f24cd3ef74
3 changed files with 4 additions and 13 deletions
|
|
@ -79,7 +79,7 @@ int inode_find_dirent_locked(inode_t *inode, const char *name, dirent_t **out)
|
|||
|
||||
int inode_find_dirent(inode_t *inode, const char *name, dirent_t **out)
|
||||
{
|
||||
if (inode->mode != INODE_DIRECTORY)
|
||||
if ((inode->mode & S_IFMT) != S_IFDIR)
|
||||
return -ENOTDIR;
|
||||
|
||||
read_lock(&inode->rwlock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue