diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-06-23 21:45:34 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-07-26 14:16:42 -0400 |
commit | 64c86149410bc62d9ac27a0594b3402a2aca03d8 (patch) | |
tree | 58ba57bd091ad80c1c7592bdd7539b10c3e3f6b8 | |
parent | f2bde9b89b4d67c9bc3b963cb996f449ddcd27a4 (diff) |
xfs: remove explicit xfs_sync_data/xfs_sync_attr calls on umount
On the final put of a superblock the VFS already calls sync_filesystem
for us to write out all data and wait for it. No need to start another
asynchronous writeback inside ->put_super.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 12 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 4 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.h | 3 |
3 files changed, 2 insertions, 17 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 9a72c05b6177..0ac1df74341f 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -1146,18 +1146,6 @@ xfs_fs_put_super( | |||
1146 | 1146 | ||
1147 | xfs_syncd_stop(mp); | 1147 | xfs_syncd_stop(mp); |
1148 | 1148 | ||
1149 | if (!(sb->s_flags & MS_RDONLY)) { | ||
1150 | /* | ||
1151 | * XXX(hch): this should be SYNC_WAIT. | ||
1152 | * | ||
1153 | * Or more likely not needed at all because the VFS is already | ||
1154 | * calling ->sync_fs after shutting down all filestem | ||
1155 | * operations and just before calling ->put_super. | ||
1156 | */ | ||
1157 | xfs_sync_data(mp, 0); | ||
1158 | xfs_sync_attr(mp, 0); | ||
1159 | } | ||
1160 | |||
1161 | /* | 1149 | /* |
1162 | * Blow away any referenced inode in the filestreams cache. | 1150 | * Blow away any referenced inode in the filestreams cache. |
1163 | * This can and will cause log traffic as inodes go inactive | 1151 | * This can and will cause log traffic as inodes go inactive |
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 0283b88bc16c..66cefb274385 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -308,7 +308,7 @@ xfs_sync_inode_attr( | |||
308 | /* | 308 | /* |
309 | * Write out pagecache data for the whole filesystem. | 309 | * Write out pagecache data for the whole filesystem. |
310 | */ | 310 | */ |
311 | int | 311 | STATIC int |
312 | xfs_sync_data( | 312 | xfs_sync_data( |
313 | struct xfs_mount *mp, | 313 | struct xfs_mount *mp, |
314 | int flags) | 314 | int flags) |
@@ -329,7 +329,7 @@ xfs_sync_data( | |||
329 | /* | 329 | /* |
330 | * Write out inode metadata (attributes) for the whole filesystem. | 330 | * Write out inode metadata (attributes) for the whole filesystem. |
331 | */ | 331 | */ |
332 | int | 332 | STATIC int |
333 | xfs_sync_attr( | 333 | xfs_sync_attr( |
334 | struct xfs_mount *mp, | 334 | struct xfs_mount *mp, |
335 | int flags) | 335 | int flags) |
diff --git a/fs/xfs/linux-2.6/xfs_sync.h b/fs/xfs/linux-2.6/xfs_sync.h index e28139aaa4aa..fe78726196f8 100644 --- a/fs/xfs/linux-2.6/xfs_sync.h +++ b/fs/xfs/linux-2.6/xfs_sync.h | |||
@@ -35,9 +35,6 @@ typedef struct xfs_sync_work { | |||
35 | int xfs_syncd_init(struct xfs_mount *mp); | 35 | int xfs_syncd_init(struct xfs_mount *mp); |
36 | void xfs_syncd_stop(struct xfs_mount *mp); | 36 | void xfs_syncd_stop(struct xfs_mount *mp); |
37 | 37 | ||
38 | int xfs_sync_attr(struct xfs_mount *mp, int flags); | ||
39 | int xfs_sync_data(struct xfs_mount *mp, int flags); | ||
40 | |||
41 | int xfs_quiesce_data(struct xfs_mount *mp); | 38 | int xfs_quiesce_data(struct xfs_mount *mp); |
42 | void xfs_quiesce_attr(struct xfs_mount *mp); | 39 | void xfs_quiesce_attr(struct xfs_mount *mp); |
43 | 40 | ||