Commit 3a306535 authored by Han Young's avatar Han Young Committed by Anna Schumaker
Browse files

NFSv4: Always set NLINK even if the server doesn't support it



fattr4_numlinks is a recommended attribute, so the client should emulate
it even if the server doesn't support it. In decode_attr_nlink function
in nfs4xdr.c, nlink is initialized to 1. However, this default value
isn't set to the inode due to the check in nfs_fhget.

So if the server doesn't support numlinks, inode's nlink will be zero,
the mount will fail with error "Stale file handle". Set the nlink to 1
if the server doesn't support it.

Signed-off-by: default avatarHan Young <hanyang.tony@bytedance.com>
Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
parent 77be29b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment