[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20140903140617.7502ad32@notabene.brown>
Date: Wed, 3 Sep 2014 14:06:17 +1000
From: NeilBrown <neilb@...e.de>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: kbuild-all@...org, lkml <linux-kernel@...r.kernel.org>,
Ian Kent <raven@...maw.net>, autofs@...r.kernel.org
Subject: [PATCH] autofs4: use ACCESS_ONCE rather than rcu_dereference for
dentry->d_inode
As the kbuild test robot reports, rcu_dereference() isn't really
appropriate here - we don't need a memory barrier, just a guard
against accidentally dereferencing NULL.
This can be merged into
autofs4: d_manage() should return -EISDIR when appropriate in rcu-walk mode.
in 'mm'.
Signed-off-by: NeilBrown <neilb@...e.de>
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 71e4413d65c8..d76d083f2f06 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -463,7 +463,7 @@ static int autofs4_d_manage(struct dentry *dentry, bool rcu_walk)
return 0;
if (d_mountpoint(dentry))
return 0;
- inode = rcu_dereference(dentry->d_inode);
+ inode = ACCESS_ONCE(dentry->d_inode);
if (inode && S_ISLNK(inode->i_mode))
return -EISDIR;
if (list_empty(&dentry->d_subdirs))
Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)
Powered by blists - more mailing lists