configfs: calculate the symlink target only once
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:

committed by
Christoph Hellwig

parent
2743c515a1
commit
e9c03af21c
@@ -28,9 +28,18 @@ static struct vfsmount *configfs_mount = NULL;
|
||||
struct kmem_cache *configfs_dir_cachep;
|
||||
static int configfs_mnt_count = 0;
|
||||
|
||||
|
||||
static void configfs_free_inode(struct inode *inode)
|
||||
{
|
||||
if (S_ISLNK(inode->i_mode))
|
||||
kfree(inode->i_link);
|
||||
free_inode_nonrcu(inode);
|
||||
}
|
||||
|
||||
static const struct super_operations configfs_ops = {
|
||||
.statfs = simple_statfs,
|
||||
.drop_inode = generic_delete_inode,
|
||||
.free_inode = configfs_free_inode,
|
||||
};
|
||||
|
||||
static struct config_group configfs_root_group = {
|
||||
|
Reference in New Issue
Block a user