aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-11 15:51:09 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 15:51:09 -0400
commita2dd3793a1c3ac709f1d7b48ad7751563f4c654f (patch)
tree81280559aad138fe997a3b4af205729093927b81 /fs/afs
parentd8725c86aebaf3516e220760aaf5fefc73825188 (diff)
parent53d5864bc673288f03bb7892a3cffa41a173082b (diff)
Merge remote-tracking branch 'dh/afs' into for-davem
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/misc.c16
-rw-r--r--fs/afs/rxrpc.c5
2 files changed, 16 insertions, 5 deletions
diff --git a/fs/afs/misc.c b/fs/afs/misc.c
index 0dd4dafee10b..91ea1aa0d8b3 100644
--- a/fs/afs/misc.c
+++ b/fs/afs/misc.c
@@ -22,9 +22,12 @@
22int afs_abort_to_error(u32 abort_code) 22int afs_abort_to_error(u32 abort_code)
23{ 23{
24 switch (abort_code) { 24 switch (abort_code) {
25 /* low errno codes inserted into abort namespace */
25 case 13: return -EACCES; 26 case 13: return -EACCES;
26 case 27: return -EFBIG; 27 case 27: return -EFBIG;
27 case 30: return -EROFS; 28 case 30: return -EROFS;
29
30 /* VICE "special error" codes; 101 - 111 */
28 case VSALVAGE: return -EIO; 31 case VSALVAGE: return -EIO;
29 case VNOVNODE: return -ENOENT; 32 case VNOVNODE: return -ENOENT;
30 case VNOVOL: return -ENOMEDIUM; 33 case VNOVOL: return -ENOMEDIUM;
@@ -36,11 +39,18 @@ int afs_abort_to_error(u32 abort_code)
36 case VOVERQUOTA: return -EDQUOT; 39 case VOVERQUOTA: return -EDQUOT;
37 case VBUSY: return -EBUSY; 40 case VBUSY: return -EBUSY;
38 case VMOVED: return -ENXIO; 41 case VMOVED: return -ENXIO;
39 case 0x2f6df0a: return -EWOULDBLOCK; 42
43 /* Unified AFS error table; ET "uae" == 0x2f6df00 */
44 case 0x2f6df00: return -EPERM;
45 case 0x2f6df01: return -ENOENT;
46 case 0x2f6df04: return -EIO;
47 case 0x2f6df0a: return -EAGAIN;
48 case 0x2f6df0b: return -ENOMEM;
40 case 0x2f6df0c: return -EACCES; 49 case 0x2f6df0c: return -EACCES;
41 case 0x2f6df0f: return -EBUSY; 50 case 0x2f6df0f: return -EBUSY;
42 case 0x2f6df10: return -EEXIST; 51 case 0x2f6df10: return -EEXIST;
43 case 0x2f6df11: return -EXDEV; 52 case 0x2f6df11: return -EXDEV;
53 case 0x2f6df12: return -ENODEV;
44 case 0x2f6df13: return -ENOTDIR; 54 case 0x2f6df13: return -ENOTDIR;
45 case 0x2f6df14: return -EISDIR; 55 case 0x2f6df14: return -EISDIR;
46 case 0x2f6df15: return -EINVAL; 56 case 0x2f6df15: return -EINVAL;
@@ -54,8 +64,12 @@ int afs_abort_to_error(u32 abort_code)
54 case 0x2f6df23: return -ENAMETOOLONG; 64 case 0x2f6df23: return -ENAMETOOLONG;
55 case 0x2f6df24: return -ENOLCK; 65 case 0x2f6df24: return -ENOLCK;
56 case 0x2f6df26: return -ENOTEMPTY; 66 case 0x2f6df26: return -ENOTEMPTY;
67 case 0x2f6df28: return -EWOULDBLOCK;
68 case 0x2f6df69: return -ENOTCONN;
69 case 0x2f6df6c: return -ETIMEDOUT;
57 case 0x2f6df78: return -EDQUOT; 70 case 0x2f6df78: return -EDQUOT;
58 71
72 /* RXKAD abort codes; from include/rxrpc/packet.h. ET "RXK" == 0x1260B00 */
59 case RXKADINCONSISTENCY: return -EPROTO; 73 case RXKADINCONSISTENCY: return -EPROTO;
60 case RXKADPACKETSHORT: return -EPROTO; 74 case RXKADPACKETSHORT: return -EPROTO;
61 case RXKADLEVELFAIL: return -EKEYREJECTED; 75 case RXKADLEVELFAIL: return -EKEYREJECTED;
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
index dbc732e9a5c0..3a57a1b0fb51 100644
--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -770,15 +770,12 @@ static int afs_deliver_cm_op_id(struct afs_call *call, struct sk_buff *skb,
770void afs_send_empty_reply(struct afs_call *call) 770void afs_send_empty_reply(struct afs_call *call)
771{ 771{
772 struct msghdr msg; 772 struct msghdr msg;
773 struct kvec iov[1];
774 773
775 _enter(""); 774 _enter("");
776 775
777 iov[0].iov_base = NULL;
778 iov[0].iov_len = 0;
779 msg.msg_name = NULL; 776 msg.msg_name = NULL;
780 msg.msg_namelen = 0; 777 msg.msg_namelen = 0;
781 iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, iov, 0, 0); /* WTF? */ 778 iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, NULL, 0, 0);
782 msg.msg_control = NULL; 779 msg.msg_control = NULL;
783 msg.msg_controllen = 0; 780 msg.msg_controllen = 0;
784 msg.msg_flags = 0; 781 msg.msg_flags = 0;