Skip to content

Commit 8b62486

Browse files
committed
NFSv4.2: Always decode the security label
jira LE-1907 Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 commit-author Trond Myklebust <trond.myklebust@hammerspace.com> commit c8a62f4 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 <trond.myklebust@hammerspace.com> (cherry picked from commit c8a62f4) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent a8304af commit 8b62486

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
@@ -4737,12 +4737,10 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
47374737
if (status < 0)
47384738
goto xdr_error;
47394739

4740-
if (fattr->label) {
4741-
status = decode_attr_security_label(xdr, bitmap, fattr->label);
4742-
if (status < 0)
4743-
goto xdr_error;
4744-
fattr->valid |= status;
4745-
}
4740+
status = decode_attr_security_label(xdr, bitmap, fattr->label);
4741+
if (status < 0)
4742+
goto xdr_error;
4743+
fattr->valid |= status;
47464744

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

0 commit comments

Comments
 (0)