summaryrefslogtreecommitdiff
path: root/fs/kernfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/kernfs/dir.c')
-rw-r--r--fs/kernfs/dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index ba5f372a226d..e1681775abd5 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -240,7 +240,7 @@ void kernfs_put(struct kernfs_node *kn)
if (kernfs_type(kn) == KERNFS_LINK)
kernfs_put(kn->symlink.target_kn);
- if (kernfs_type(kn) & KERNFS_COPY_NAME)
+ if (!(kn->flags & KERNFS_STATIC_NAME))
kfree(kn->name);
if (kn->iattr) {
if (kn->iattr->ia_secdata)
@@ -336,13 +336,13 @@ const struct dentry_operations kernfs_dops = {
};
struct kernfs_node *kernfs_new_node(struct kernfs_root *root, const char *name,
- umode_t mode, int type)
+ umode_t mode, unsigned flags)
{
char *dup_name = NULL;
struct kernfs_node *kn;
int ret;
- if (type & KERNFS_COPY_NAME) {
+ if (!(flags & KERNFS_STATIC_NAME)) {
name = dup_name = kstrdup(name, GFP_KERNEL);
if (!name)
return NULL;
@@ -362,7 +362,7 @@ struct kernfs_node *kernfs_new_node(struct kernfs_root *root, const char *name,
kn->name = name;
kn->mode = mode;
- kn->flags = type | KERNFS_REMOVED;
+ kn->flags = flags | KERNFS_REMOVED;
return kn;