lkml.org 
[lkml]   [2014]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 05/16] overlayfs: Replace smp_read_barrier_depends() with lockless_dereference()
From
On Thu, Nov 13, 2014 at 8:24 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> Recently lockless_dereference() was added which can be used in place of
> hard-coding smp_read_barrier_depends(). The following PATCH makes the change.
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
> fs/overlayfs/super.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
> index 08b704c..b0f050e 100644
> --- a/fs/overlayfs/super.c
> +++ b/fs/overlayfs/super.c
> @@ -84,12 +84,10 @@ 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)
> --
> 1.9.1
>

Thanks, already in overlayfs-next branch of

git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next

Thanks,
Miklos


\
 
 \ /
  Last update: 2014-11-17 12:01    [W:0.174 / U:2.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site