Skip to content

Commit 202f390

Browse files
committed
NFSD: Fix NFSv4's PUTPUBFH operation
According to RFC 8881, all minor versions of NFSv4 support PUTPUBFH. Replace the XDR decoder for PUTPUBFH with a "noop" since we no longer want the minorversion check, and PUTPUBFH has no arguments to decode. (Ideally nfsd4_decode_noop should really be called nfsd4_decode_void). PUTPUBFH should now behave just like PUTROOTFH. Reported-by: Cedric Blancher <[email protected]> Fixes: e1a90eb ("NFSD: Combine decode operations for v4 and v4.1") Cc: Dan Shelton <[email protected]> Cc: Roland Mainz <[email protected]> Cc: [email protected] Signed-off-by: Chuck Lever <[email protected]>
1 parent 32b34fa commit 202f390

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

fs/nfsd/nfs4xdr.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,14 +1245,6 @@ nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
12451245
return nfs_ok;
12461246
}
12471247

1248-
static __be32
1249-
nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, union nfsd4_op_u *p)
1250-
{
1251-
if (argp->minorversion == 0)
1252-
return nfs_ok;
1253-
return nfserr_notsupp;
1254-
}
1255-
12561248
static __be32
12571249
nfsd4_decode_read(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u)
12581250
{
@@ -2374,7 +2366,7 @@ static const nfsd4_dec nfsd4_dec_ops[] = {
23742366
[OP_OPEN_CONFIRM] = nfsd4_decode_open_confirm,
23752367
[OP_OPEN_DOWNGRADE] = nfsd4_decode_open_downgrade,
23762368
[OP_PUTFH] = nfsd4_decode_putfh,
2377-
[OP_PUTPUBFH] = nfsd4_decode_putpubfh,
2369+
[OP_PUTPUBFH] = nfsd4_decode_noop,
23782370
[OP_PUTROOTFH] = nfsd4_decode_noop,
23792371
[OP_READ] = nfsd4_decode_read,
23802372
[OP_READDIR] = nfsd4_decode_readdir,

0 commit comments

Comments
 (0)