aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c39
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.h3
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c4
3 files changed, 1 insertions, 45 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 */
140void
141xfs_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
diff --git a/fs/xfs/linux-2.6/xfs_iops.h b/fs/xfs/linux-2.6/xfs_iops.h
index 2204f466dee0..8b1a1e31dc21 100644
--- a/fs/xfs/linux-2.6/xfs_iops.h
+++ b/fs/xfs/linux-2.6/xfs_iops.h
@@ -26,9 +26,6 @@ extern const struct file_operations xfs_invis_file_operations;
26 26
27extern ssize_t xfs_vn_listxattr(struct dentry *, char *data, size_t size); 27extern ssize_t xfs_vn_listxattr(struct dentry *, char *data, size_t size);
28 28
29extern void xfs_ichgtime(struct xfs_inode *, int);
30extern void xfs_ichgtime_fast(struct xfs_inode *, struct inode *, int);
31
32extern void xfs_setup_inode(struct xfs_inode *); 29extern void xfs_setup_inode(struct xfs_inode *);
33 30
34#endif /* __XFS_IOPS_H__ */ 31#endif /* __XFS_IOPS_H__ */
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index e03e2c3789b7..1957e5357d04 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -674,9 +674,7 @@ start:
674 */ 674 */
675 if (likely(!(ioflags & IO_INVIS) && 675 if (likely(!(ioflags & IO_INVIS) &&
676 !mnt_want_write(file->f_path.mnt))) { 676 !mnt_want_write(file->f_path.mnt))) {
677 file_update_time(file); 677 xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
678 xfs_ichgtime_fast(xip, inode,
679 XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
680 mnt_drop_write(file->f_path.mnt); 678 mnt_drop_write(file->f_path.mnt);
681 } 679 }
682 680