Commit c8a62f44 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.2: Always decode the security label

If the server returns a reply that includes a security label, then we
must decode it whether or not we can store the results.

Fixes: 1e2f67da ("NFS: Remove the nfs4_label argument from decode_getattr_*() functions")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent eef7314c
...@@ -4755,12 +4755,10 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap, ...@@ -4755,12 +4755,10 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
if (status < 0) if (status < 0)
goto xdr_error; goto xdr_error;
if (fattr->label) { status = decode_attr_security_label(xdr, bitmap, fattr->label);
status = decode_attr_security_label(xdr, bitmap, fattr->label); if (status < 0)
if (status < 0) goto xdr_error;
goto xdr_error; fattr->valid |= status;
fattr->valid |= status;
}
xdr_error: xdr_error:
dprintk("%s: xdr returned %d\n", __func__, -status); dprintk("%s: xdr returned %d\n", __func__, -status);
......
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