]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4.2: encode_readdir - only ask for labels when doing readdirplus
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 4 Nov 2013 18:23:59 +0000 (13:23 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 4 Nov 2013 21:42:51 +0000 (16:42 -0500)
commit888d0aad1e99d0850433b9983b575bf8aa7af092
treebad66f4fac985065c1466a5186c629da41ae77cc
parent22a0f91e6bc25b88c82bf4579982cd29f2094b73
NFSv4.2: encode_readdir - only ask for labels when doing readdirplus

Currently, if the server is doing NFSv4.2 and supports labeled NFS, then
our on-the-wire READDIR request ends up asking for the label information,
which is then ignored unless we're doing readdirplus.
This patch ensures that READDIR doesn't ask the server for label information
at all unless the readdir->bitmask contains the FATTR4_WORD2_SECURITY_LABEL
attribute, and the readdir->plus flag is set.

While we're at it, optimise away the 3rd bitmap field if it is zero.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4xdr.c