diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-08-13 02:48:12 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-08-13 02:48:12 -0400 |
commit | 3a76c1ea07ee4e9da7c8e476e43be7e1b2bf24fb (patch) | |
tree | 710ff6b462d1e43d7c5d77d72f47f297e196ccf8 /fs/xfs/linux-2.6/xfs_iops.c | |
parent | 8e5975c82f66bce36955f38e9abc259d5143a72a (diff) |
[XFS] stop using file_update_time
xfs_ichtime updates the xfs_inode and Linux inode timestamps just fine, no
need to call file_update_time and then copy the values over to the XFS
inode. The only additional thing in file_update_time are checks not
applicable to the write path.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31829a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 0e7ca2155956..91bcd979242c 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -133,45 +133,6 @@ xfs_ichgtime( | |||
133 | } | 133 | } |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Variant on the above which avoids querying the system clock | ||
137 | * in situations where we know the Linux inode timestamps have | ||
138 | * just been updated (and so we can update our inode cheaply). | ||
139 | */ | ||
140 | void | ||
141 | xfs_ichgtime_fast( | ||
142 | xfs_inode_t *ip, | ||
143 | struct inode *inode, | ||
144 | int flags) | ||
145 | { | ||
146 | timespec_t *tvp; | ||
147 | |||
148 | if (flags & XFS_ICHGTIME_MOD) { | ||
149 | tvp = &inode->i_mtime; | ||
150 | ip->i_d.di_mtime.t_sec = (__int32_t)tvp->tv_sec; | ||
151 | ip->i_d.di_mtime.t_nsec = (__int32_t)tvp->tv_nsec; | ||
152 | } | ||
153 | if (flags & XFS_ICHGTIME_CHG) { | ||
154 | tvp = &inode->i_ctime; | ||
155 | ip->i_d.di_ctime.t_sec = (__int32_t)tvp->tv_sec; | ||
156 | ip->i_d.di_ctime.t_nsec = (__int32_t)tvp->tv_nsec; | ||
157 | } | ||
158 | |||
159 | /* | ||
160 | * We update the i_update_core field _after_ changing | ||
161 | * the timestamps in order to coordinate properly with | ||
162 | * xfs_iflush() so that we don't lose timestamp updates. | ||
163 | * This keeps us from having to hold the inode lock | ||
164 | * while doing this. We use the SYNCHRONIZE macro to | ||
165 | * ensure that the compiler does not reorder the update | ||
166 | * of i_update_core above the timestamp updates above. | ||
167 | */ | ||
168 | SYNCHRONIZE(); | ||
169 | ip->i_update_core = 1; | ||
170 | if (!(inode->i_state & I_NEW)) | ||
171 | mark_inode_dirty_sync(inode); | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * Hook in SELinux. This is not quite correct yet, what we really need | 136 | * Hook in SELinux. This is not quite correct yet, what we really need |
176 | * here (as we do for default ACLs) is a mechanism by which creation of | 137 | * here (as we do for default ACLs) is a mechanism by which creation of |
177 | * these attrs can be journalled at inode creation time (along with the | 138 | * these attrs can be journalled at inode creation time (along with the |