summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorOlga Kornievskaia <kolga@netapp.com>2021-11-29 21:33:56 +0100
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2022-01-06 20:00:20 +0100
commit2c52c8376db7160a1dd8a681c61c9258405ef143 (patch)
tree333931a7d3ea5e345a4edf801b3208f5413b5a36 /fs/nfs/nfs4xdr.c
parentSUNRPC: clean up some inconsistent indenting (diff)
downloadlinux-2c52c8376db7160a1dd8a681c61c9258405ef143.tar.xz
linux-2c52c8376db7160a1dd8a681c61c9258405ef143.zip
NFSv4 only print the label when its queried
When the bitmask of the attributes doesn't include the security label, don't bother printing it. Since the label might not be null terminated, adjust the printing format accordingly. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to '')
-rw-r--r--fs/nfs/nfs4xdr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 69862bf6db00..801119b7a596 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4200,10 +4200,11 @@ static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap,
} else
printk(KERN_WARNING "%s: label too long (%u)!\n",
__func__, len);
+ if (label && label->label)
+ dprintk("%s: label=%.*s, len=%d, PI=%d, LFS=%d\n",
+ __func__, label->len, (char *)label->label,
+ label->len, label->pi, label->lfs);
}
- if (label && label->label)
- dprintk("%s: label=%s, len=%d, PI=%d, LFS=%d\n", __func__,
- (char *)label->label, label->len, label->pi, label->lfs);
return status;
}