Diff for /xfs-linux/linux-2.6/xfs_ioctl.c between versions 1.152 and 1.153

version 1.152, 2007/09/11 06:11:49 version 1.153, 2007/09/11 06:12:43
Line 152  xfs_find_handle( Line 152  xfs_find_handle(
                 lock_mode = xfs_ilock_map_shared(ip);                  lock_mode = xfs_ilock_map_shared(ip);
   
                 /* fill in fid section of handle from inode */                  /* fill in fid section of handle from inode */
                 handle.ha_fid.xfs_fid_len = sizeof(xfs_fid_t) -                  handle.ha_fid.fid_len = sizeof(xfs_fid_t) -
                                             sizeof(handle.ha_fid.xfs_fid_len);                                          sizeof(handle.ha_fid.fid_len);
                 handle.ha_fid.xfs_fid_pad = 0;                  handle.ha_fid.fid_pad = 0;
                 handle.ha_fid.xfs_fid_gen = ip->i_d.di_gen;                  handle.ha_fid.fid_gen = ip->i_d.di_gen;
                 handle.ha_fid.xfs_fid_ino = ip->i_ino;                  handle.ha_fid.fid_ino = ip->i_ino;
   
                 xfs_iunlock_map_shared(ip, lock_mode);                  xfs_iunlock_map_shared(ip, lock_mode);
   
Line 222  xfs_vget_fsop_handlereq( Line 222  xfs_vget_fsop_handlereq(
         if (hlen < sizeof(*handlep))          if (hlen < sizeof(*handlep))
                 memset(((char *)handlep) + hlen, 0, sizeof(*handlep) - hlen);                  memset(((char *)handlep) + hlen, 0, sizeof(*handlep) - hlen);
         if (hlen > sizeof(handlep->ha_fsid)) {          if (hlen > sizeof(handlep->ha_fsid)) {
                 if (handlep->ha_fid.xfs_fid_len !=                  if (handlep->ha_fid.fid_len !=
                                 (hlen - sizeof(handlep->ha_fsid)                      (hlen - sizeof(handlep->ha_fsid) -
                                         - sizeof(handlep->ha_fid.xfs_fid_len))                              sizeof(handlep->ha_fid.fid_len)) ||
                     || handlep->ha_fid.xfs_fid_pad)                      handlep->ha_fid.fid_pad)
                         return XFS_ERROR(EINVAL);                          return XFS_ERROR(EINVAL);
         }          }
   
Line 233  xfs_vget_fsop_handlereq( Line 233  xfs_vget_fsop_handlereq(
          * Crack the handle, obtain the inode # & generation #           * Crack the handle, obtain the inode # & generation #
          */           */
         xfid = (struct xfs_fid *)&handlep->ha_fid;          xfid = (struct xfs_fid *)&handlep->ha_fid;
         if (xfid->xfs_fid_len == sizeof(*xfid) - sizeof(xfid->xfs_fid_len)) {          if (xfid->fid_len == sizeof(*xfid) - sizeof(xfid->fid_len)) {
                 ino  = xfid->xfs_fid_ino;                  ino  = xfid->fid_ino;
                 igen = xfid->xfs_fid_gen;                  igen = xfid->fid_gen;
         } else {          } else {
                 return XFS_ERROR(EINVAL);                  return XFS_ERROR(EINVAL);
         }          }

Removed from v.1.152  
changed lines
  Added in v.1.153


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>