mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 12:49:08 +00:00
NFS: Fix the mode calculation in nfs_find_open_context
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
80e60639f1
commit
1544fa0f7a
@ -623,10 +623,10 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_c
|
||||
list_for_each_entry(pos, &nfsi->open_files, list) {
|
||||
if (cred != NULL && pos->cred != cred)
|
||||
continue;
|
||||
if ((pos->mode & mode) == mode) {
|
||||
ctx = get_nfs_open_context(pos);
|
||||
break;
|
||||
}
|
||||
if ((pos->mode & (FMODE_READ|FMODE_WRITE)) != mode)
|
||||
continue;
|
||||
ctx = get_nfs_open_context(pos);
|
||||
break;
|
||||
}
|
||||
spin_unlock(&inode->i_lock);
|
||||
return ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user