Skip to content

Commit

Permalink
bpf: switch to ->free_inode()
Browse files Browse the repository at this point in the history
Acked-by: Alexei Starovoitov <[email protected]>
Acked-by: Song Liu <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed May 2, 2019
1 parent 015d795 commit 524845f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions kernel/bpf/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,8 @@ static int bpf_show_options(struct seq_file *m, struct dentry *root)
return 0;
}

static void bpf_destroy_inode_deferred(struct rcu_head *head)
static void bpf_free_inode(struct inode *inode)
{
struct inode *inode = container_of(head, struct inode, i_rcu);
enum bpf_type type;

if (S_ISLNK(inode->i_mode))
Expand All @@ -578,16 +577,11 @@ static void bpf_destroy_inode_deferred(struct rcu_head *head)
free_inode_nonrcu(inode);
}

static void bpf_destroy_inode(struct inode *inode)
{
call_rcu(&inode->i_rcu, bpf_destroy_inode_deferred);
}

static const struct super_operations bpf_super_ops = {
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
.show_options = bpf_show_options,
.destroy_inode = bpf_destroy_inode,
.free_inode = bpf_free_inode,
};

enum {
Expand Down

0 comments on commit 524845f

Please sign in to comment.