Diff for /xfs-linux/xfs_vnodeops.c between versions 1.686 and 1.687

version 1.686, 2006/11/07 14:39:38 version 1.687, 2006/11/07 14:40:26
Line 3827  xfs_reclaim( Line 3827  xfs_reclaim(
          */           */
         xfs_synchronize_atime(ip);          xfs_synchronize_atime(ip);
   
         /* If we have nothing to flush with this inode then complete the          /*
          * teardown now, otherwise break the link between the xfs inode           * If we have nothing to flush with this inode then complete the
          * and the linux inode and clean up the xfs inode later. This           * teardown now, otherwise break the link between the xfs inode and the
          * avoids flushing the inode to disk during the delete operation           * linux inode and clean up the xfs inode later. This avoids flushing
          * itself.           * the inode to disk during the delete operation itself.
            *
            * When breaking the link, we need to set the XFS_IRECLAIMABLE flag
            * first to ensure that xfs_iunpin() will never see an xfs inode
            * that has a linux inode being reclaimed. Synchronisation is provided
            * by the i_flags_lock.
          */           */
         if (!ip->i_update_core && (ip->i_itemp == NULL)) {          if (!ip->i_update_core && (ip->i_itemp == NULL)) {
                 xfs_ilock(ip, XFS_ILOCK_EXCL);                  xfs_ilock(ip, XFS_ILOCK_EXCL);
Line 3840  xfs_reclaim( Line 3845  xfs_reclaim(
         } else {          } else {
                 xfs_mount_t     *mp = ip->i_mount;                  xfs_mount_t     *mp = ip->i_mount;
   
                 /* Protect sync from us */                  /* Protect sync and unpin from us */
                 XFS_MOUNT_ILOCK(mp);                  XFS_MOUNT_ILOCK(mp);
                   spin_lock(&ip->i_flags_lock);
                   __xfs_iflags_set(ip, XFS_IRECLAIMABLE);
                 vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip));                  vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip));
                   spin_unlock(&ip->i_flags_lock);
                 list_add_tail(&ip->i_reclaim, &mp->m_del_inodes);                  list_add_tail(&ip->i_reclaim, &mp->m_del_inodes);
                 xfs_iflags_set(ip, XFS_IRECLAIMABLE);  
                 XFS_MOUNT_IUNLOCK(mp);                  XFS_MOUNT_IUNLOCK(mp);
         }          }
         return 0;          return 0;

Removed from v.1.686  
changed lines
  Added in v.1.687


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