diff options
Diffstat (limited to 'fs/overlayfs')
| -rw-r--r-- | fs/overlayfs/export.c | 2 | ||||
| -rw-r--r-- | fs/overlayfs/super.c | 13 | 
2 files changed, 7 insertions, 8 deletions
| diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c index 54e5d17d7f3e..cc1c9e5606ba 100644 --- a/fs/overlayfs/export.c +++ b/fs/overlayfs/export.c @@ -398,7 +398,7 @@ static struct dentry *ovl_lookup_real_one(struct dentry *connected,  	 * pointer because we hold no lock on the real dentry.  	 */  	take_dentry_name_snapshot(&name, real); -	this = lookup_one_len(name.name, connected, strlen(name.name)); +	this = lookup_one_len(name.name.name, connected, name.name.len);  	err = PTR_ERR(this);  	if (IS_ERR(this)) {  		goto fail; diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 0116735cc321..5ec4fc2f5d7e 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -190,11 +190,13 @@ static struct inode *ovl_alloc_inode(struct super_block *sb)  	return &oi->vfs_inode;  } -static void ovl_i_callback(struct rcu_head *head) +static void ovl_free_inode(struct inode *inode)  { -	struct inode *inode = container_of(head, struct inode, i_rcu); +	struct ovl_inode *oi = OVL_I(inode); -	kmem_cache_free(ovl_inode_cachep, OVL_I(inode)); +	kfree(oi->redirect); +	mutex_destroy(&oi->lock); +	kmem_cache_free(ovl_inode_cachep, oi);  }  static void ovl_destroy_inode(struct inode *inode) @@ -207,10 +209,6 @@ static void ovl_destroy_inode(struct inode *inode)  		ovl_dir_cache_free(inode);  	else  		iput(oi->lowerdata); -	kfree(oi->redirect); -	mutex_destroy(&oi->lock); - -	call_rcu(&inode->i_rcu, ovl_i_callback);  }  static void ovl_free_fs(struct ovl_fs *ofs) @@ -377,6 +375,7 @@ static int ovl_remount(struct super_block *sb, int *flags, char *data)  static const struct super_operations ovl_super_operations = {  	.alloc_inode	= ovl_alloc_inode, +	.free_inode	= ovl_free_inode,  	.destroy_inode	= ovl_destroy_inode,  	.drop_inode	= generic_delete_inode,  	.put_super	= ovl_put_super, |