Skip to content

Commit

Permalink
ovl: use lockless_dereference() for upperdentry
Browse files Browse the repository at this point in the history
Don't open code lockless_dereference() in ovl_upperdentry_dereference().

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  • Loading branch information
Miklos Szeredi committed Nov 20, 2014
1 parent 91c7794 commit 71d5092
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/overlayfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,7 @@ enum ovl_path_type ovl_path_type(struct dentry *dentry)

static struct dentry *ovl_upperdentry_dereference(struct ovl_entry *oe)
{
struct dentry *upperdentry = ACCESS_ONCE(oe->__upperdentry);
/*
* Make sure to order reads to upperdentry wrt ovl_dentry_update()
*/
smp_read_barrier_depends();
return upperdentry;
return lockless_dereference(oe->__upperdentry);
}

void ovl_path_upper(struct dentry *dentry, struct path *path)
Expand Down

0 comments on commit 71d5092

Please sign in to comment.