Commit 65f51603 authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

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: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 9a206de2
...@@ -1061,7 +1061,7 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, const struct ...@@ -1061,7 +1061,7 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, const struct
rcu_read_lock(); rcu_read_lock();
list_for_each_entry_rcu(pos, &nfsi->open_files, list) { 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; continue;
if ((pos->mode & (FMODE_READ|FMODE_WRITE)) != mode) if ((pos->mode & (FMODE_READ|FMODE_WRITE)) != mode)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment