Merge tag 'afs-fixes-20180514' into afs-proc
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 2 Jun 2018 22:08:11 +0000 (18:08 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 2 Jun 2018 22:09:27 +0000 (18:09 -0400)
backmerge AFS fixes that went into mainline and deal with
the conflict in fs/afs/fsclient.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1  2 
fs/afs/cmservice.c
fs/afs/fsclient.c
fs/afs/internal.h
fs/afs/rxrpc.c
fs/afs/super.c

Simple merge
index b695d9e16c654bfc589255fdf574698fb1291206,b273e1d60478c3c9f89a84a7b85fb6325a9a2c84..2a80bbcc31f9e42d55fe41524579e28bf7157256
@@@ -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)) {
 -                      ret = 0;
 -                      goto out;
+               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;
++                      return 0;
+               }
                pr_warn("Unknown AFSFetchStatus version %u\n", ntohl(xdr->if_version));
                goto bad;
        }
  
 -              ret = 0;
 -              goto out;
+       if (abort_code != 0 && inline_error) {
+               status->abort_code = abort_code;
++              return 0;
+       }
        type = ntohl(xdr->type);
-       abort_code = ntohl(xdr->abort_code);
        switch (type) {
        case AFS_FTYPE_FILE:
        case AFS_FTYPE_DIR:
Simple merge
diff --cc fs/afs/rxrpc.c
Simple merge
diff --cc fs/afs/super.c
Simple merge