diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-11 08:46:53 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-11 08:46:53 -0400 |
commit | 336879b1da97fffc097f77c6d6f818660f2826f0 (patch) | |
tree | 4ddb4d1c5d2b67fb096c72e41d2a03b01a605041 /fs/btrfs/file.c | |
parent | 3d3cbd84300e7be1e53083cac0f6f9c12978ecb4 (diff) | |
parent | fdcaa1dbb7c6ed419b10fb8cdb5001ab0a00538f (diff) |
Merge remote-tracking branch 'airlied/drm-next' into topic/vblank-rework
Dave asked me to do the backmerge before sending him the revised pull
request, so here we go. Nothing fancy in the conflicts, just a few
things changed right next to each another.
Conflicts:
drivers/gpu/drm/drm_irq.c
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 1f2b99cb55ea..d3afac292d67 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1838,33 +1838,9 @@ out: | |||
1838 | 1838 | ||
1839 | int btrfs_release_file(struct inode *inode, struct file *filp) | 1839 | int btrfs_release_file(struct inode *inode, struct file *filp) |
1840 | { | 1840 | { |
1841 | /* | ||
1842 | * ordered_data_close is set by settattr when we are about to truncate | ||
1843 | * a file from a non-zero size to a zero size. This tries to | ||
1844 | * flush down new bytes that may have been written if the | ||
1845 | * application were using truncate to replace a file in place. | ||
1846 | */ | ||
1847 | if (test_and_clear_bit(BTRFS_INODE_ORDERED_DATA_CLOSE, | ||
1848 | &BTRFS_I(inode)->runtime_flags)) { | ||
1849 | struct btrfs_trans_handle *trans; | ||
1850 | struct btrfs_root *root = BTRFS_I(inode)->root; | ||
1851 | |||
1852 | /* | ||
1853 | * We need to block on a committing transaction to keep us from | ||
1854 | * throwing a ordered operation on to the list and causing | ||
1855 | * something like sync to deadlock trying to flush out this | ||
1856 | * inode. | ||
1857 | */ | ||
1858 | trans = btrfs_start_transaction(root, 0); | ||
1859 | if (IS_ERR(trans)) | ||
1860 | return PTR_ERR(trans); | ||
1861 | btrfs_add_ordered_operation(trans, BTRFS_I(inode)->root, inode); | ||
1862 | btrfs_end_transaction(trans, root); | ||
1863 | if (inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT) | ||
1864 | filemap_flush(inode->i_mapping); | ||
1865 | } | ||
1866 | if (filp->private_data) | 1841 | if (filp->private_data) |
1867 | btrfs_ioctl_trans_end(filp); | 1842 | btrfs_ioctl_trans_end(filp); |
1843 | filemap_flush(inode->i_mapping); | ||
1868 | return 0; | 1844 | return 0; |
1869 | } | 1845 | } |
1870 | 1846 | ||