summaryrefslogtreecommitdiff
path: root/security/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/inode.c')
-rw-r--r--security/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/inode.c b/security/inode.c
index a67004f9d106..bfe02e68f92e 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -164,7 +164,7 @@ static int create_by_name(const char *name, mode_t mode,
mutex_lock(&parent->d_inode->i_mutex);
*dentry = lookup_one_len(name, parent, strlen(name));
if (!IS_ERR(*dentry)) {
- if ((mode & S_IFMT) == S_IFDIR)
+ if (S_ISDIR(mode))
error = mkdir(parent->d_inode, *dentry, mode);
else
error = create(parent->d_inode, *dentry, mode);