From 3201f3dd7370f2d29dfb689ae16f8f5d4066cc33 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Sat, 23 Oct 2010 15:43:10 -0400 Subject: 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: Trond Myklebust --- fs/nfs/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/nfs/nfs4xdr.c') diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index a6b00e84bd1..707975eebb5 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -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; } -- cgit v1.2.3