[BACK]Return to fdesc_vnops.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / miscfs / fdesc

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/miscfs/fdesc/fdesc_vnops.c between version 1.96 and 1.96.6.3

version 1.96, 2007/02/09 21:55:36 version 1.96.6.3, 2007/08/20 21:27:48
Line 246  loop:
Line 246  loop:
         fd->fd_fd = -1;          fd->fd_fd = -1;
         fd->fd_link = 0;          fd->fd_link = 0;
         fd->fd_ix = ix;          fd->fd_ix = ix;
           uvm_vnp_setsize(*vpp, 0);
         VOP_LOCK(*vpp, LK_EXCLUSIVE);          VOP_LOCK(*vpp, LK_EXCLUSIVE);
         LIST_INSERT_HEAD(fc, fd, fd_hash);          LIST_INSERT_HEAD(fc, fd, fd_hash);
   
Line 429  fdesc_open(v)
Line 430  fdesc_open(v)
                 return EDUPFD;                  return EDUPFD;
   
         case Fctty:          case Fctty:
                 return ((*ctty_cdevsw.d_open)(devctty, ap->a_mode, 0, ap->a_l));                  return cdev_open(devctty, ap->a_mode, 0, ap->a_l);
         case Froot:          case Froot:
         case Fdevfd:          case Fdevfd:
         case Flink:          case Flink:
Line 457  fdesc_attr(fd, vap, cred, l)
Line 458  fdesc_attr(fd, vap, cred, l)
   
         switch (fp->f_type) {          switch (fp->f_type) {
         case DTYPE_VNODE:          case DTYPE_VNODE:
                 simple_unlock(&fp->f_slock);                  FILE_USE(fp);
                 error = VOP_GETATTR((struct vnode *) fp->f_data, vap, cred, l);                  error = VOP_GETATTR((struct vnode *) fp->f_data, vap, cred, l);
                   FILE_UNUSE(fp, l);
                 if (error == 0 && vap->va_type == VDIR) {                  if (error == 0 && vap->va_type == VDIR) {
                         /*                          /*
                          * directories can cause loops in the namespace,                           * directories can cause loops in the namespace,
Line 628  fdesc_setattr(v)
Line 630  fdesc_setattr(v)
          *      On vnode's this will cause truncation and socket/pipes make           *      On vnode's this will cause truncation and socket/pipes make
          *      no sense.           *      no sense.
          */           */
         simple_unlock(&fp->f_slock);          mutex_exit(&fp->f_lock);
         return (0);          return (0);
 }  }
   
Line 837  fdesc_read(v)
Line 839  fdesc_read(v)
         switch (VTOFDESC(vp)->fd_type) {          switch (VTOFDESC(vp)->fd_type) {
         case Fctty:          case Fctty:
                 VOP_UNLOCK(vp, 0);                  VOP_UNLOCK(vp, 0);
                 error = (*ctty_cdevsw.d_read)(devctty, ap->a_uio, ap->a_ioflag);                  error = cdev_read(devctty, ap->a_uio, ap->a_ioflag);
                 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);                  vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
                 break;                  break;
   
Line 865  fdesc_write(v)
Line 867  fdesc_write(v)
         switch (VTOFDESC(vp)->fd_type) {          switch (VTOFDESC(vp)->fd_type) {
         case Fctty:          case Fctty:
                 VOP_UNLOCK(vp, 0);                  VOP_UNLOCK(vp, 0);
                 error = (*ctty_cdevsw.d_write)(devctty, ap->a_uio,                  error = cdev_write(devctty, ap->a_uio, ap->a_ioflag);
                                                ap->a_ioflag);  
                 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);                  vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
                 break;                  break;
   
Line 894  fdesc_ioctl(v)
Line 895  fdesc_ioctl(v)
   
         switch (VTOFDESC(ap->a_vp)->fd_type) {          switch (VTOFDESC(ap->a_vp)->fd_type) {
         case Fctty:          case Fctty:
                 error = (*ctty_cdevsw.d_ioctl)(devctty, ap->a_command,                  error = cdev_ioctl(devctty, ap->a_command, ap->a_data,
                                                ap->a_data, ap->a_fflag,                      ap->a_fflag, ap->a_l);
                                                ap->a_l);  
                 break;                  break;
   
         default:          default:
Line 920  fdesc_poll(v)
Line 920  fdesc_poll(v)
   
         switch (VTOFDESC(ap->a_vp)->fd_type) {          switch (VTOFDESC(ap->a_vp)->fd_type) {
         case Fctty:          case Fctty:
                 revents = (*ctty_cdevsw.d_poll)(devctty, ap->a_events, ap->a_l);                  revents = cdev_poll(devctty, ap->a_events, ap->a_l);
                 break;                  break;
   
         default:          default:
Line 946  fdesc_kqfilter(v)
Line 946  fdesc_kqfilter(v)
   
         switch (VTOFDESC(ap->a_vp)->fd_type) {          switch (VTOFDESC(ap->a_vp)->fd_type) {
         case Fctty:          case Fctty:
                 error = (*ctty_cdevsw.d_kqfilter)(devctty, ap->a_kn);                  error = cdev_kqfilter(devctty, ap->a_kn);
                 break;                  break;
   
         case Fdesc:          case Fdesc:

Legend:
Removed from v.1.96  
changed lines
  Added in v.1.96.6.3

CVSweb <webmaster@jp.NetBSD.org>