Skip to content

Commit f54423a

Browse files
kinglongmeetrondmypd
authored andcommitted
NFS4: Cleanup FATTR4_WORD0_FS_LOCATIONS after decoding success
Commit 1ca843a "nfs: Fix GETATTR bitmap verification" has check the bitmap after decoding success, but decode_attr_fs_locations forgets cleanup the FATTR4_WORD0_FS_LOCATIONS bits. decode_getfattr_attrs always return -EIO when meeting FS_LOCATIONS now. ls: cannot access /mnt/referal: Input/output error ls: cannot access /mnt/replicas: Input/output error total 32 drwxr-xr-x. 7 root root 8192 Nov 16 20:36 pnfs ??????????? ? ? ? ? ? referal ??????????? ? ? ? ? ? replicas v2: clear the bit earlier Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
1 parent 291e1b9 commit f54423a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/nfs/nfs4xdr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3615,6 +3615,7 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st
36153615
status = 0;
36163616
if (unlikely(!(bitmap[0] & FATTR4_WORD0_FS_LOCATIONS)))
36173617
goto out;
3618+
bitmap[0] &= ~FATTR4_WORD0_FS_LOCATIONS;
36183619
status = -EIO;
36193620
/* Ignore borken servers that return unrequested attrs */
36203621
if (unlikely(res == NULL))

0 commit comments

Comments
 (0)