Skip to content

Commit

Permalink
NFSv4: Fix a regression in decode_getfattr
Browse files Browse the repository at this point in the history
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: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 23, 2010
1 parent 7ad0735 commit 3201f3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (status < 0)
goto xdr_error;
if (status != 0) {
if (status != 0 && !(fattr->valid & status)) {
fattr->fileid = fileid;
fattr->valid |= status;
}
Expand Down

0 comments on commit 3201f3d

Please sign in to comment.