aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c4
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.h7
2 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 8696096f8d22..3e76c5c9dda1 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -668,11 +668,11 @@ xfs_write(
668 io = &xip->i_iocore; 668 io = &xip->i_iocore;
669 mp = io->io_mount; 669 mp = io->io_mount;
670 670
671 vfs_wait_for_freeze(vp->v_vfsp, SB_FREEZE_WRITE);
672
671 if (XFS_FORCED_SHUTDOWN(mp)) 673 if (XFS_FORCED_SHUTDOWN(mp))
672 return -EIO; 674 return -EIO;
673 675
674 fs_check_frozen(vp->v_vfsp, SB_FREEZE_WRITE);
675
676 if (ioflags & IO_ISDIRECT) { 676 if (ioflags & IO_ISDIRECT) {
677 xfs_buftarg_t *target = 677 xfs_buftarg_t *target =
678 (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? 678 (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ?
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h
index 7b88eeae0f26..91fc2c4b3353 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.h
+++ b/fs/xfs/linux-2.6/xfs_vfs.h
@@ -190,6 +190,9 @@ extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, bhv_desc_t *, int);
190extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); 190extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int);
191extern void vfs_freeze(bhv_desc_t *); 191extern void vfs_freeze(bhv_desc_t *);
192 192
193#define vfs_test_for_freeze(vfs) ((vfs)->vfs_super->s_frozen)
194#define vfs_wait_for_freeze(vfs,l) vfs_check_frozen((vfs)->vfs_super, (l))
195
193typedef struct bhv_module_vfsops { 196typedef struct bhv_module_vfsops {
194 struct bhv_vfsops bhv_common; 197 struct bhv_vfsops bhv_common;
195 void * bhv_custom; 198 void * bhv_custom;
@@ -211,8 +214,4 @@ extern void bhv_insert_all_vfsops(struct bhv_vfs *);
211extern void bhv_remove_all_vfsops(struct bhv_vfs *, int); 214extern void bhv_remove_all_vfsops(struct bhv_vfs *, int);
212extern void bhv_remove_vfsops(struct bhv_vfs *, int); 215extern void bhv_remove_vfsops(struct bhv_vfs *, int);
213 216
214#define fs_frozen(vfsp) ((vfsp)->vfs_super->s_frozen)
215#define fs_check_frozen(vfsp, level) \
216 vfs_check_frozen(vfsp->vfs_super, level);
217
218#endif /* __XFS_VFS_H__ */ 217#endif /* __XFS_VFS_H__ */