]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/configfs/symlink.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[karo-tx-linux.git] / fs / configfs / symlink.c
index e5512e295cf2970b865d7ee398ed41d87634e067..2a731ef5f305c3bdd803937a3d893997a2ca6361 100644 (file)
@@ -66,7 +66,7 @@ static void fill_item_path(struct config_item * item, char * buffer, int length)
 }
 
 static int create_link(struct config_item *parent_item,
-                      struct config_item *item,
+                      struct config_item *item,
                       struct dentry *dentry)
 {
        struct configfs_dirent *target_sd = item->ci_dentry->d_fsdata;
@@ -99,11 +99,11 @@ static int get_target(const char *symname, struct nameidata *nd,
 
        ret = path_lookup(symname, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, nd);
        if (!ret) {
-               if (nd->dentry->d_sb == configfs_sb) {
-                       *target = configfs_get_config_item(nd->dentry);
+               if (nd->path.dentry->d_sb == configfs_sb) {
+                       *target = configfs_get_config_item(nd->path.dentry);
                        if (!*target) {
                                ret = -ENOENT;
-                               path_release(nd);
+                               path_put(&nd->path);
                        }
                } else
                        ret = -EPERM;
@@ -141,7 +141,7 @@ int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symna
                ret = create_link(parent_item, target_item, dentry);
 
        config_item_put(target_item);
-       path_release(&nd);
+       path_put(&nd.path);
 
 out_put:
        config_item_put(parent_item);
@@ -210,13 +210,13 @@ static int configfs_get_target_path(struct config_item * item, struct config_ite
        if (size > PATH_MAX)
                return -ENAMETOOLONG;
 
-       pr_debug("%s: depth = %d, size = %d\n", __FUNCTION__, depth, size);
+       pr_debug("%s: depth = %d, size = %d\n", __func__, depth, size);
 
        for (s = path; depth--; s += 3)
                strcpy(s,"../");
 
        fill_item_path(target, path, size);
-       pr_debug("%s: path = '%s'\n", __FUNCTION__, path);
+       pr_debug("%s: path = '%s'\n", __func__, path);
 
        return 0;
 }
@@ -272,7 +272,7 @@ static void configfs_put_link(struct dentry *dentry, struct nameidata *nd,
        }
 }
 
-struct inode_operations configfs_symlink_inode_operations = {
+const struct inode_operations configfs_symlink_inode_operations = {
        .follow_link = configfs_follow_link,
        .readlink = generic_readlink,
        .put_link = configfs_put_link,