diff options
Diffstat (limited to 'fs/kernfs/symlink.c')
-rw-r--r-- | fs/kernfs/symlink.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c index b2c106ca3434..a03e26036ef9 100644 --- a/fs/kernfs/symlink.c +++ b/fs/kernfs/symlink.c | |||
@@ -40,13 +40,9 @@ struct kernfs_node *kernfs_create_link(struct kernfs_node *parent, | |||
40 | kn->symlink.target_kn = target; | 40 | kn->symlink.target_kn = target; |
41 | kernfs_get(target); /* ref owned by symlink */ | 41 | kernfs_get(target); /* ref owned by symlink */ |
42 | 42 | ||
43 | error = -ENOENT; | 43 | kernfs_addrm_start(&acxt); |
44 | if (kernfs_get_active(parent)) { | 44 | error = kernfs_add_one(&acxt, kn, parent); |
45 | kernfs_addrm_start(&acxt); | 45 | kernfs_addrm_finish(&acxt); |
46 | error = kernfs_add_one(&acxt, kn, parent); | ||
47 | kernfs_addrm_finish(&acxt); | ||
48 | kernfs_put_active(parent); | ||
49 | } | ||
50 | 46 | ||
51 | if (!error) | 47 | if (!error) |
52 | return kn; | 48 | return kn; |