]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_lrw.c
[XFS] stop using file_update_time
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_lrw.c
index 1ebd8004469c1d3a70a0afc0f8a34f8400ea5011..1957e5357d047b067b25719c34099bbb006a9cb6 100644 (file)
@@ -137,7 +137,7 @@ xfs_iozero(
        struct address_space    *mapping;
        int                     status;
 
-       mapping = ip->i_vnode->i_mapping;
+       mapping = VFS_I(ip)->i_mapping;
        do {
                unsigned offset, bytes;
                void *fsdata;
@@ -394,7 +394,7 @@ xfs_zero_last_block(
        int             error = 0;
        xfs_bmbt_irec_t imap;
 
-       ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE) != 0);
+       ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
 
        zero_offset = XFS_B_FSB_OFFSET(mp, isize);
        if (zero_offset == 0) {
@@ -425,14 +425,14 @@ xfs_zero_last_block(
         * out sync.  We need to drop the ilock while we do this so we
         * don't deadlock when the buffer cache calls back to us.
         */
-       xfs_iunlock(ip, XFS_ILOCK_EXCL| XFS_EXTSIZE_RD);
+       xfs_iunlock(ip, XFS_ILOCK_EXCL);
 
        zero_len = mp->m_sb.sb_blocksize - zero_offset;
        if (isize + zero_len > offset)
                zero_len = offset - isize;
        error = xfs_iozero(ip, isize, zero_len);
 
-       xfs_ilock(ip, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
+       xfs_ilock(ip, XFS_ILOCK_EXCL);
        ASSERT(error >= 0);
        return error;
 }
@@ -465,8 +465,7 @@ xfs_zero_eof(
        int             error = 0;
        xfs_bmbt_irec_t imap;
 
-       ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE));
-       ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE));
+       ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL));
        ASSERT(offset > isize);
 
        /*
@@ -475,8 +474,7 @@ xfs_zero_eof(
         */
        error = xfs_zero_last_block(ip, offset, isize);
        if (error) {
-               ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE));
-               ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE));
+               ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL));
                return error;
        }
 
@@ -507,8 +505,7 @@ xfs_zero_eof(
                error = xfs_bmapi(NULL, ip, start_zero_fsb, zero_count_fsb,
                                  0, NULL, 0, &imap, &nimaps, NULL, NULL);
                if (error) {
-                       ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE));
-                       ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE));
+                       ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL));
                        return error;
                }
                ASSERT(nimaps > 0);
@@ -532,7 +529,7 @@ xfs_zero_eof(
                 * Drop the inode lock while we're doing the I/O.
                 * We'll still have the iolock to protect us.
                 */
-               xfs_iunlock(ip, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
+               xfs_iunlock(ip, XFS_ILOCK_EXCL);
 
                zero_off = XFS_FSB_TO_B(mp, start_zero_fsb);
                zero_len = XFS_FSB_TO_B(mp, imap.br_blockcount);
@@ -548,13 +545,13 @@ xfs_zero_eof(
                start_zero_fsb = imap.br_startoff + imap.br_blockcount;
                ASSERT(start_zero_fsb <= (end_zero_fsb + 1));
 
-               xfs_ilock(ip, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
+               xfs_ilock(ip, XFS_ILOCK_EXCL);
        }
 
        return 0;
 
 out_lock:
-       xfs_ilock(ip, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);
+       xfs_ilock(ip, XFS_ILOCK_EXCL);
        ASSERT(error >= 0);
        return error;
 }
@@ -677,9 +674,7 @@ start:
         */
        if (likely(!(ioflags & IO_INVIS) &&
                   !mnt_want_write(file->f_path.mnt))) {
-               file_update_time(file);
-               xfs_ichgtime_fast(xip, inode,
-                                 XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
+               xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
                mnt_drop_write(file->f_path.mnt);
        }
 
@@ -714,7 +709,7 @@ start:
             !capable(CAP_FSETID)) {
                error = xfs_write_clear_setuid(xip);
                if (likely(!error))
-                       error = -remove_suid(file->f_path.dentry);
+                       error = -file_remove_suid(file);
                if (unlikely(error)) {
                        goto out_unlock_internal;
                }