diff options
author | Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com> | 2019-12-10 11:16:39 +0530 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-02-20 15:58:21 -0800 |
commit | 9f01eb5d4936f12d57da84cdfbc2a3623e23a7eb (patch) | |
tree | a4a83f0749377b6220344a5ae4ea201bd427de28 /fs/nfs | |
parent | bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 (diff) |
nfs: Fix nfs_access_get_cached_rcu() sparse error
This patch fixes the following sparse error:
fs/nfs/dir.c:2353:14: error: incompatible types in comparison expression (different address spaces):
fs/nfs/dir.c:2353:14: struct list_head [noderef] <asn:4> *
fs/nfs/dir.c:2353:14: struct list_head *
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 1320288ff9ec..55a29b0d52fc 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2383,7 +2383,7 @@ static int nfs_access_get_cached_rcu(struct inode *inode, const struct cred *cre rcu_read_lock(); if (nfsi->cache_validity & NFS_INO_INVALID_ACCESS) goto out; - lh = rcu_dereference(nfsi->access_cache_entry_lru.prev); + lh = rcu_dereference(list_tail_rcu(&nfsi->access_cache_entry_lru)); cache = list_entry(lh, struct nfs_access_entry, lru); if (lh == &nfsi->access_cache_entry_lru || cred_fscmp(cred, cache->cred) != 0) |