Skip to contentSkip to conversation

NFSD: add encoding of op_recall flag for write delegation

PATCH In review Dai Ngo 3 participants 3 messages Jun 6, 2023 – Jun 7, 2023

Subsystems (2)
lore
Share & tools
lore

Dai Ngo

author reviewer
#0 lore raw

PATCH 1/1 NFSD: add encoding of op_recall flag for write delegation

Modified nfsd4_encode_open to encode the op_recall flag properly for OPEN result with write delegation granted.

---
 fs/nfsd/nfs4xdr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4xdr.c +1 -1
index 4590b893dbc8..d7e46b940cce 100644
@@ -3975,7 +3975,7 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr,
 		p = xdr_reserve_space(xdr, 32);
 		if (!p)
 			return nfserr_resource;
-		*p++ = cpu_to_be32(0);
+		*p++ = cpu_to_be32(open->op_recall);
 
 		/*
 		 * TODO: space_limit's in delegations
Signature · 1 line
2.9.5
#1 lore raw
Quoted 6 lines · Dai Ngo

Modified nfsd4_encode_open to encode the op_recall flag properly for OPEN result with write delegation granted.

This appears to have been broken for forever. I can't really nail down a Fixes: commit, so I will add a Cc: stable.

Quoted 21 lines

---
fs/nfsd/nfs4xdr.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4xdr.c +1 -1
index 4590b893dbc8..d7e46b940cce 100644
@@ -3975,7 +3975,7 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr,
 p = xdr_reserve_space(xdr, 32);
 if (!p)
 return nfserr_resource;
- *p++ = cpu_to_be32(0);
+ *p++ = cpu_to_be32(open->op_recall);
 
 /*
 * TODO: space_limit's in delegations
Signature · 1 line
2.9.5

--
Chuck Lever

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Dai Ngo
Quoted 13 lines · Dai Ngo

Modified nfsd4_encode_open to encode the op_recall flag properly for OPEN result with write delegation granted.

---
 fs/nfsd/nfs4xdr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4xdr.c +0 -0
index 4590b893dbc8..d7e46b940cce 100644

fs/nfsd/nfs4xdr.c nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, · line 3981

Quoted 8 lines
fs/nfsd/nfs4xdr.c +1 -1
@@ -3975,7 +3975,7 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr,
 		p = xdr_reserve_space(xdr, 32);
 		if (!p)
 			return nfserr_resource;
-		*p++ = cpu_to_be32(0);
+		*p++ = cpu_to_be32(open->op_recall);
 
 		/*
 		 * TODO: space_limit's in delegations

Nice catch!