Commit 3201f3dd authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Fix a regression in decode_getfattr

We don't want to have the mounted_on_fileid overwrite the true fileid. We
only return the former if the server didn't supply the true fileid.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 7ad07353
...@@ -3912,7 +3912,7 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap, ...@@ -3912,7 +3912,7 @@ static int decode_getfattr_attrs(struct xdr_stream *xdr, uint32_t *bitmap,
status = decode_attr_mounted_on_fileid(xdr, bitmap, &fileid); status = decode_attr_mounted_on_fileid(xdr, bitmap, &fileid);
if (status < 0) if (status < 0)
goto xdr_error; goto xdr_error;
if (status != 0) { if (status != 0 && !(fattr->valid & status)) {
fattr->fileid = fileid; fattr->fileid = fileid;
fattr->valid |= status; fattr->valid |= status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment