From: Al Viro Date: Sat, 2 Jun 2018 22:08:11 +0000 (-0400) Subject: Merge tag 'afs-fixes-20180514' into afs-proc X-Git-Tag: v5.4.17~5784^2~6 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=de52cf922a4a17d0a4cd34d697db62a01c1bd092;p=arm%2Flinux.git Merge tag 'afs-fixes-20180514' into afs-proc backmerge AFS fixes that went into mainline and deal with the conflict in fs/afs/fsclient.c Signed-off-by: Al Viro --- de52cf922a4a17d0a4cd34d697db62a01c1bd092 diff --cc fs/afs/fsclient.c index b695d9e16c65,b273e1d60478..2a80bbcc31f9 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c @@@ -137,14 -138,37 +138,31 @@@ static int xdr_decode_AFSFetchStatus(st u64 data_version, size; u32 type, abort_code; u8 flags = 0; - int ret; - - if (vnode) - write_seqlock(&vnode->cb_lock); + abort_code = ntohl(xdr->abort_code); + if (xdr->if_version != htonl(AFS_FSTATUS_VERSION)) { + if (xdr->if_version == htonl(0) && + abort_code != 0 && + inline_error) { + /* The OpenAFS fileserver has a bug in FS.InlineBulkStatus + * whereby it doesn't set the interface version in the error + * case. + */ + status->abort_code = abort_code; - ret = 0; - goto out; ++ return 0; + } + pr_warn("Unknown AFSFetchStatus version %u\n", ntohl(xdr->if_version)); goto bad; } + if (abort_code != 0 && inline_error) { + status->abort_code = abort_code; - ret = 0; - goto out; ++ return 0; + } + type = ntohl(xdr->type); - abort_code = ntohl(xdr->abort_code); switch (type) { case AFS_FTYPE_FILE: case AFS_FTYPE_DIR: