diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:39:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:39:39 -0400 |
commit | 253ba4e79edc695b2925bd2ef34de06ff4d4070c (patch) | |
tree | 259667140ca702d6a218cc54f4df275fbbda747b /fs/xfs/linux-2.6/xfs_fs_subr.c | |
parent | 188da98800893691e47eea9335a234378e32aceb (diff) | |
parent | 65e67f5165c8a156b34ee7adf65d5ed3b16a910d (diff) |
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6: (87 commits)
[XFS] Fix merge failure
[XFS] The forward declarations for the xfs_ioctl() helpers and the
[XFS] Update XFS documentation for noikeep/ikeep.
[XFS] Update XFS Documentation for ikeep and ihashsize
[XFS] Remove unused HAVE_SPLICE macro.
[XFS] Remove CONFIG_XFS_SECURITY.
[XFS] xfs_bmap_compute_maxlevels should be based on di_forkoff
[XFS] Always use di_forkoff when checking for attr space.
[XFS] Ensure the inode is joined in xfs_itruncate_finish
[XFS] Remove periodic logging of in-core superblock counters.
[XFS] fix logic error in xfs_alloc_ag_vextent_near()
[XFS] Don't error out on good I/Os.
[XFS] Catch log unmount failures.
[XFS] Sanitise xfs_log_force error checking.
[XFS] Check for errors when changing buffer pointers.
[XFS] Don't allow silent errors in xfs_inactive().
[XFS] Catch errors from xfs_imap().
[XFS] xfs_bulkstat_one_dinode() never returns an error.
[XFS] xfs_iflush_fork() never returns an error.
[XFS] Catch unwritten extent conversion errors.
...
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_fs_subr.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_fs_subr.c | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.c b/fs/xfs/linux-2.6/xfs_fs_subr.c index ac6d34cc355d..1eefe61f0e10 100644 --- a/fs/xfs/linux-2.6/xfs_fs_subr.c +++ b/fs/xfs/linux-2.6/xfs_fs_subr.c | |||
@@ -17,18 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include "xfs.h" | 18 | #include "xfs.h" |
19 | #include "xfs_vnodeops.h" | 19 | #include "xfs_vnodeops.h" |
20 | |||
21 | /* | ||
22 | * The following six includes are needed so that we can include | ||
23 | * xfs_inode.h. What a mess.. | ||
24 | */ | ||
25 | #include "xfs_bmap_btree.h" | 20 | #include "xfs_bmap_btree.h" |
26 | #include "xfs_inum.h" | ||
27 | #include "xfs_dir2.h" | ||
28 | #include "xfs_dir2_sf.h" | ||
29 | #include "xfs_attr_sf.h" | ||
30 | #include "xfs_dinode.h" | ||
31 | |||
32 | #include "xfs_inode.h" | 21 | #include "xfs_inode.h" |
33 | 22 | ||
34 | int fs_noerr(void) { return 0; } | 23 | int fs_noerr(void) { return 0; } |
@@ -42,11 +31,10 @@ xfs_tosspages( | |||
42 | xfs_off_t last, | 31 | xfs_off_t last, |
43 | int fiopt) | 32 | int fiopt) |
44 | { | 33 | { |
45 | bhv_vnode_t *vp = XFS_ITOV(ip); | 34 | struct address_space *mapping = ip->i_vnode->i_mapping; |
46 | struct inode *inode = vn_to_inode(vp); | ||
47 | 35 | ||
48 | if (VN_CACHED(vp)) | 36 | if (mapping->nrpages) |
49 | truncate_inode_pages(inode->i_mapping, first); | 37 | truncate_inode_pages(mapping, first); |
50 | } | 38 | } |
51 | 39 | ||
52 | int | 40 | int |
@@ -56,15 +44,14 @@ xfs_flushinval_pages( | |||
56 | xfs_off_t last, | 44 | xfs_off_t last, |
57 | int fiopt) | 45 | int fiopt) |
58 | { | 46 | { |
59 | bhv_vnode_t *vp = XFS_ITOV(ip); | 47 | struct address_space *mapping = ip->i_vnode->i_mapping; |
60 | struct inode *inode = vn_to_inode(vp); | ||
61 | int ret = 0; | 48 | int ret = 0; |
62 | 49 | ||
63 | if (VN_CACHED(vp)) { | 50 | if (mapping->nrpages) { |
64 | xfs_iflags_clear(ip, XFS_ITRUNCATED); | 51 | xfs_iflags_clear(ip, XFS_ITRUNCATED); |
65 | ret = filemap_write_and_wait(inode->i_mapping); | 52 | ret = filemap_write_and_wait(mapping); |
66 | if (!ret) | 53 | if (!ret) |
67 | truncate_inode_pages(inode->i_mapping, first); | 54 | truncate_inode_pages(mapping, first); |
68 | } | 55 | } |
69 | return ret; | 56 | return ret; |
70 | } | 57 | } |
@@ -77,17 +64,16 @@ xfs_flush_pages( | |||
77 | uint64_t flags, | 64 | uint64_t flags, |
78 | int fiopt) | 65 | int fiopt) |
79 | { | 66 | { |
80 | bhv_vnode_t *vp = XFS_ITOV(ip); | 67 | struct address_space *mapping = ip->i_vnode->i_mapping; |
81 | struct inode *inode = vn_to_inode(vp); | ||
82 | int ret = 0; | 68 | int ret = 0; |
83 | int ret2; | 69 | int ret2; |
84 | 70 | ||
85 | if (VN_DIRTY(vp)) { | 71 | if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { |
86 | xfs_iflags_clear(ip, XFS_ITRUNCATED); | 72 | xfs_iflags_clear(ip, XFS_ITRUNCATED); |
87 | ret = filemap_fdatawrite(inode->i_mapping); | 73 | ret = filemap_fdatawrite(mapping); |
88 | if (flags & XFS_B_ASYNC) | 74 | if (flags & XFS_B_ASYNC) |
89 | return ret; | 75 | return ret; |
90 | ret2 = filemap_fdatawait(inode->i_mapping); | 76 | ret2 = filemap_fdatawait(mapping); |
91 | if (!ret) | 77 | if (!ret) |
92 | ret = ret2; | 78 | ret = ret2; |
93 | } | 79 | } |