Skip to content

Commit c8a62f4

Browse files
author
Trond Myklebust
committed
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: 1e2f67d ("NFS: Remove the nfs4_label argument from decode_getattr_*() functions") Signed-off-by: Trond Myklebust <[email protected]>
1 parent eef7314 commit c8a62f4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

fs/nfs/nfs4xdr.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4755,12 +4755,10 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
47554755
if (status < 0)
47564756
goto xdr_error;
47574757

4758-
if (fattr->label) {
4759-
status = decode_attr_security_label(xdr, bitmap, fattr->label);
4760-
if (status < 0)
4761-
goto xdr_error;
4762-
fattr->valid |= status;
4763-
}
4758+
status = decode_attr_security_label(xdr, bitmap, fattr->label);
4759+
if (status < 0)
4760+
goto xdr_error;
4761+
fattr->valid |= status;
47644762

47654763
xdr_error:
47664764
dprintk("%s: xdr returned %d\n", __func__, -status);

0 commit comments

Comments
 (0)