Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2acac498 authored by Olga Kornievskaia's avatar Olga Kornievskaia Committed by Greg Kroah-Hartman
Browse files

NFSv4 only print the label when its queried



[ Upstream commit 2c52c8376db7160a1dd8a681c61c9258405ef143 ]

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: default avatarOlga Kornievskaia <kolga@netapp.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 891c4ebf
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -4187,10 +4187,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__,
			(char *)label->label, label->len, label->pi, label->lfs);
			dprintk("%s: label=%.*s, len=%d, PI=%d, LFS=%d\n",
				__func__, label->len, (char *)label->label,
				label->len, label->pi, label->lfs);
	}
	return status;
}