summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-07-14 11:28:20 +1000
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-08-03 17:14:11 -0400
commitd51ac1a8e9b86b2d17d349bb256869cab6522787 (patch)
treeddb2dc1a448c67d512465eaee7c73cfdbbe4bf23 /net/sunrpc
parent49317a7fdaa462b09b9bb4942b64c3a3316bd564 (diff)
downloadop-kernel-dev-d51ac1a8e9b86b2d17d349bb256869cab6522787.zip
op-kernel-dev-d51ac1a8e9b86b2d17d349bb256869cab6522787.tar.gz
NFS: prepare for RCU-walk support but pushing tests later in code.
nfs_lookup_revalidate, nfs4_lookup_revalidate, and nfs_permission all need to understand and handle RCU-walk for NFS to gain the benefits of RCU-walk for cached information. Currently these functions all immediately return -ECHILD if the relevant flag (LOOKUP_RCU or MAY_NOT_BLOCK) is set. This patch pushes those tests later in the code so that we only abort immediately before we enter rcu-unsafe code. As subsequent patches make that rcu-unsafe code rcu-safe, several of these new tests will disappear. With this patch there are several paths through the code which will no longer return -ECHILD during an RCU-walk. However these are mostly error paths or other uninteresting cases. A noteworthy change in nfs_lookup_revalidate is that we don't take (or put) the reference to ->d_parent when LOOKUP_RCU is set. Rather we rcu_dereference ->d_parent, and check that ->d_inode is not NULL. We also check that ->d_parent hasn't changed after all the tests. In nfs4_lookup_revalidate we simply avoid testing LOOKUP_RCU on the path that only calls nfs_lookup_revalidate() as that function already performs the required test. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud