Keep read and write fds with each nlm_file

We shouldn't really be using a read-only file descriptor to take a write
lock.

Most filesystems will put up with it.  But NFS, for example, won't.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
J. Bruce Fields
2021-08-23 16:44:00 -04:00
committed by Chuck Lever
parent b661601a9f
commit 7f024fcd5c
7 changed files with 111 additions and 44 deletions

View File

@@ -27,7 +27,8 @@ struct rpc_task;
struct nlmsvc_binding {
__be32 (*fopen)(struct svc_rqst *,
struct nfs_fh *,
struct file **);
struct file **,
int mode);
void (*fclose)(struct file *);
};