diff options
author | Trond Myklebust <trondmy@gmail.com> | 2020-01-26 17:31:15 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2020-02-03 16:35:07 -0500 |
commit | 65f5160376212094b477c7309ba9867e69ec69d5 (patch) | |
tree | f709786dc6aeeadc2b6d6ca8db228f611e8ec45d | |
parent | 9a206de2ea878f4502e86b81c0d7eb9b651bde82 (diff) | |
download | linux-65f5160376212094b477c7309ba9867e69ec69d5.tar.bz2 |
NFS: nfs_find_open_context() should use cred_fscmp()
We want to find open contexts that match our filesystem access
properties. They don't have to exactly match the cred.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r-- | fs/nfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 71dfc9d2fc3d..1309e6f47f3d 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1061,7 +1061,7 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, const struct rcu_read_lock(); list_for_each_entry_rcu(pos, &nfsi->open_files, list) { - if (cred != NULL && pos->cred != cred) + if (cred != NULL && cred_fscmp(pos->cred, cred) != 0) continue; if ((pos->mode & (FMODE_READ|FMODE_WRITE)) != mode) continue; |