Merge branch 'master' into for_paulus
[linux-drm-fsl-dcu.git] / fs / configfs / symlink.c
index 50f5840521a93c0b91fda648a9f3fc9debc659d8..22700d2857daa36b62173fdedc5960d317ade1e9 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;
@@ -162,8 +162,7 @@ int configfs_unlink(struct inode *dir, struct dentry *dentry)
        if (!(sd->s_type & CONFIGFS_ITEM_LINK))
                goto out;
 
-       if (dentry->d_parent == configfs_sb->s_root)
-               BUG();
+       BUG_ON(dentry->d_parent == configfs_sb->s_root);
 
        sl = sd->s_element;
 
@@ -273,9 +272,10 @@ 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,
+       .setattr = configfs_setattr,
 };