Jeff Layton has uploaded this change for review.

View Change

nfs4: encode only valid attrs

I was seeing some warnings like this on Linux clients when accessing
shares that had security labels enabled:

nfs_setsecurity() 0 security_inode_notifysecctx() -13

The inodes in question had no labels on them, but ganesha was setting
the FATTR4_SEC_LABEL bit in the reply and sending a zero-length label
in the reply. The ceph code will clear ATTR4_SEC_LABEL in that
situation, but the encoder doesn't consult the valid_mask.

Skip encoding any attribute that has a legit attrmask bit, when that
bit is not set in the valid_mask.

Change-Id: I0efb283a0ef0e5fb49bbcb0f1cb03d909161493a
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
M src/Protocols/NFS/nfs_proto_tools.c
1 file changed, 5 insertions(+), 0 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/50/510750/1

To view, visit change 510750. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I0efb283a0ef0e5fb49bbcb0f1cb03d909161493a
Gerrit-Change-Number: 510750
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton@redhat.com>
Gerrit-MessageType: newchange