diff options
author | Olof Johansson <olof@lixom.net> | 2014-09-24 14:20:48 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-09-24 14:21:01 -0400 |
commit | 28fd837204236cf5b5533525e5b53c5176fa97a3 (patch) | |
tree | ac7dcad925950bc0bb53c5a55cb199e31e7aaee0 /fs/btrfs/file.c | |
parent | c82eb464879dd0ecbe0c4cb1b80ac4e82b634872 (diff) | |
parent | 64d14a31d5410ea34641c41795e0ba222bda740c (diff) |
Merge tag 'imx-cleanup-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/cleanup
Merge "ARM: imx: cleanup for 3.18" from Shawn Guo:
The i.MX cleanup for 3.18:
- Reomve a few i.MX27 and i.MX1 board files
- Remove imx_scu_standby_enable() since core code handles scu
standby now
- Remove unnecessary iomux declaration
- Remove useless sound card property from vf610-twr dts
* tag 'imx-cleanup-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
ARM: imx: Remove mach-mxt_td60 board file
ARM: i.MX: Remove i.MX1 ADS board support
ARM: dts: vf610-twr: remove useless property for sound card.
ARM: imx: remove imx_scu_standby_enable()
ARM: i.MX: Remove Phytec i.MX27 PCM038/PCM970 board files
ARM: i.MX: Remove mach-cpuimx27sd board file
ARM: imx: iomux: Do not export symbol without public declaration
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index d3afac292d67..36861b7a6757 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1840,7 +1840,15 @@ int btrfs_release_file(struct inode *inode, struct file *filp) | |||
1840 | { | 1840 | { |
1841 | if (filp->private_data) | 1841 | if (filp->private_data) |
1842 | btrfs_ioctl_trans_end(filp); | 1842 | btrfs_ioctl_trans_end(filp); |
1843 | filemap_flush(inode->i_mapping); | 1843 | /* |
1844 | * ordered_data_close is set by settattr when we are about to truncate | ||
1845 | * a file from a non-zero size to a zero size. This tries to | ||
1846 | * flush down new bytes that may have been written if the | ||
1847 | * application were using truncate to replace a file in place. | ||
1848 | */ | ||
1849 | if (test_and_clear_bit(BTRFS_INODE_ORDERED_DATA_CLOSE, | ||
1850 | &BTRFS_I(inode)->runtime_flags)) | ||
1851 | filemap_flush(inode->i_mapping); | ||
1844 | return 0; | 1852 | return 0; |
1845 | } | 1853 | } |
1846 | 1854 | ||
@@ -2088,10 +2096,9 @@ static int fill_holes(struct btrfs_trans_handle *trans, struct inode *inode, | |||
2088 | goto out; | 2096 | goto out; |
2089 | } | 2097 | } |
2090 | 2098 | ||
2091 | if (hole_mergeable(inode, leaf, path->slots[0]+1, offset, end)) { | 2099 | if (hole_mergeable(inode, leaf, path->slots[0], offset, end)) { |
2092 | u64 num_bytes; | 2100 | u64 num_bytes; |
2093 | 2101 | ||
2094 | path->slots[0]++; | ||
2095 | key.offset = offset; | 2102 | key.offset = offset; |
2096 | btrfs_set_item_key_safe(root, path, &key); | 2103 | btrfs_set_item_key_safe(root, path, &key); |
2097 | fi = btrfs_item_ptr(leaf, path->slots[0], | 2104 | fi = btrfs_item_ptr(leaf, path->slots[0], |
@@ -2216,7 +2223,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) | |||
2216 | goto out_only_mutex; | 2223 | goto out_only_mutex; |
2217 | } | 2224 | } |
2218 | 2225 | ||
2219 | lockstart = round_up(offset , BTRFS_I(inode)->root->sectorsize); | 2226 | lockstart = round_up(offset, BTRFS_I(inode)->root->sectorsize); |
2220 | lockend = round_down(offset + len, | 2227 | lockend = round_down(offset + len, |
2221 | BTRFS_I(inode)->root->sectorsize) - 1; | 2228 | BTRFS_I(inode)->root->sectorsize) - 1; |
2222 | same_page = ((offset >> PAGE_CACHE_SHIFT) == | 2229 | same_page = ((offset >> PAGE_CACHE_SHIFT) == |
@@ -2277,7 +2284,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) | |||
2277 | tail_start + tail_len, 0, 1); | 2284 | tail_start + tail_len, 0, 1); |
2278 | if (ret) | 2285 | if (ret) |
2279 | goto out_only_mutex; | 2286 | goto out_only_mutex; |
2280 | } | 2287 | } |
2281 | } | 2288 | } |
2282 | } | 2289 | } |
2283 | 2290 | ||