Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/sockfs/sockcommon_sops.c
          +++ new/usr/src/uts/common/fs/sockfs/sockcommon_sops.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   */
  25   25  
  26   26  /*
  27      - * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
       27 + * Copyright (c) 2014, Joyent, Inc.  All rights reserved.
  28   28   */
  29   29  
  30   30  #include <sys/types.h>
  31   31  #include <sys/param.h>
  32   32  #include <sys/systm.h>
  33   33  #include <sys/sysmacros.h>
  34   34  #include <sys/debug.h>
  35   35  #include <sys/cmn_err.h>
  36   36  
  37   37  #include <sys/stropts.h>
↓ open down ↓ 1279 lines elided ↑ open up ↑
1317 1317                          DTRACE_PROBE2(filter__data, (sof_instance_t), filter,
1318 1318                              (mblk_t *), mp);
1319 1319                          /* Data was consumed/dropped, just do space check */
1320 1320                          if (msg_size == 0) {
1321 1321                                  mutex_enter(&so->so_lock);
1322 1322                                  goto space_check;
1323 1323                          }
1324 1324                  }
1325 1325          }
1326 1326  
1327      -        mutex_enter(&so->so_lock);
1328      -        if (so->so_krecv_cb != NULL) {
1329      -                boolean_t cont;
1330      -                so_krecv_f func = so->so_krecv_cb;
1331      -                void *arg = so->so_krecv_arg;
1332      -
1333      -                mutex_exit(&so->so_lock);
1334      -                cont = func(so, mp, msg_size, flags & MSG_OOB, arg);
1335      -                mutex_enter(&so->so_lock);
1336      -                if (cont == B_TRUE) {
1337      -                        space_left = so->so_rcvbuf;
1338      -                } else {
1339      -                        so->so_rcv_queued = so->so_rcvlowat;
1340      -                        *errorp = ENOSPC;
1341      -                        space_left = -1;
1342      -                }
1343      -                goto done_unlock;
1344      -        }
1345      -        mutex_exit(&so->so_lock);
1346      -
1347 1327          if (flags & MSG_OOB) {
1348 1328                  so_queue_oob(so, mp, msg_size);
1349 1329                  mutex_enter(&so->so_lock);
1350 1330                  goto space_check;
1351 1331          }
1352 1332  
1353 1333          if (force_pushp != NULL)
1354 1334                  force_push = *force_pushp;
1355 1335  
1356 1336          mutex_enter(&so->so_lock);
↓ open down ↓ 258 lines elided ↑ open up ↑
1615 1595          struct uio      *suiop;
1616 1596  
1617 1597          SO_BLOCK_FALLBACK(so, SOP_RECVMSG(so, msg, uiop, cr));
1618 1598  
1619 1599          if ((so->so_state & (SS_ISCONNECTED|SS_CANTRCVMORE)) == 0 &&
1620 1600              (so->so_mode & SM_CONNREQUIRED)) {
1621 1601                  SO_UNBLOCK_FALLBACK(so);
1622 1602                  return (ENOTCONN);
1623 1603          }
1624 1604  
1625      -        mutex_enter(&so->so_lock);
1626      -        if (so->so_krecv_cb != NULL) {
1627      -                mutex_exit(&so->so_lock);
1628      -                return (EOPNOTSUPP);
1629      -        }
1630      -        mutex_exit(&so->so_lock);
1631      -
1632 1605          if (msg->msg_flags & MSG_PEEK)
1633 1606                  msg->msg_flags &= ~MSG_WAITALL;
1634 1607  
1635 1608          if (so->so_mode & SM_ATOMIC)
1636 1609                  msg->msg_flags |= MSG_TRUNC;
1637 1610  
1638 1611          if (msg->msg_flags & MSG_OOB) {
1639 1612                  if ((so->so_mode & SM_EXDATA) == 0) {
1640 1613                          error = EOPNOTSUPP;
1641 1614                  } else if (so->so_downcalls->sd_recv_uio != NULL) {
↓ open down ↓ 338 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX