]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/xfs/xfs_vnodeops.c
xfs: Code cleanup and removal of some typedef usage
[mirror_ubuntu-artful-kernel.git] / fs / xfs / xfs_vnodeops.c
index 1501f4fa51a6e4a0a683ca9998ded29a0410e450..42c0ef288aeb219290ad344bc426430b17a76f52 100644 (file)
@@ -322,18 +322,9 @@ xfs_inactive(
        xfs_trans_ijoin(tp, ip, 0);
 
        if (S_ISLNK(ip->i_d.di_mode)) {
-               /*
-                * Zero length symlinks _can_ exist.
-                */
-               if (ip->i_d.di_size > XFS_IFORK_DSIZE(ip)) {
-                       error = xfs_inactive_symlink_rmt(ip, &tp);
-                       if (error)
-                               goto out_cancel;
-               } else if (ip->i_df.if_bytes > 0) {
-                       xfs_idata_realloc(ip, -(ip->i_df.if_bytes),
-                                         XFS_DATA_FORK);
-                       ASSERT(ip->i_df.if_bytes == 0);
-               }
+               error = xfs_inactive_symlink(ip, &tp);
+               if (error)
+                       goto out_cancel;
        } else if (truncate) {
                ip->i_d.di_size = 0;
                xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
@@ -1453,7 +1444,7 @@ xfs_free_file_space(
        xfs_mount_t             *mp;
        int                     nimap;
        uint                    resblks;
-       uint                    rounding;
+       xfs_off_t               rounding;
        int                     rt;
        xfs_fileoff_t           startoffset_fsb;
        xfs_trans_t             *tp;
@@ -1482,7 +1473,7 @@ xfs_free_file_space(
                inode_dio_wait(VFS_I(ip));
        }
 
-       rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE);
+       rounding = max_t(xfs_off_t, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE);
        ioffset = offset & ~(rounding - 1);
        error = -filemap_write_and_wait_range(VFS_I(ip)->i_mapping,
                                              ioffset, -1);