diff options
| author | Dave Airlie <airlied@redhat.com> | 2010-05-18 19:35:51 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 19:35:51 -0400 |
| commit | 05ea893c46805b2981ea8ba6df881e3d65edd63b (patch) | |
| tree | ea381e22d99f49bd2c95238f88491d48b797a17b /fs/ocfs2/file.c | |
| parent | 26481fb15644b5fd85d4cea020f74a234cdf6803 (diff) | |
| parent | a7c542782e92f9487c62a571565637be3d6b0ffd (diff) | |
Merge remote branch 'anholt/drm-intel-next' into drm-next
* anholt/drm-intel-next: (515 commits)
drm/i915: Fix out of tree builds
drm/i915: move fence lru to struct drm_i915_fence_reg
drm/i915: don't allow tiling changes on pinned buffers v2
drm/i915: Be extra careful about A/D matching for multifunction SDVO
drm/i915: Fix DDC bus selection for multifunction SDVO
drm/i915: cleanup mode setting before unmapping registers
drm/i915: Make fbc control wrapper functions
drm/i915: Wait for the GPU whilst shrinking, if truly desperate.
drm/i915: Use spatio-temporal dithering on PCH
[MTD] Remove zero-length files mtdbdi.c and internal.ho
pata_pcmcia / ide-cs: Fix bad hashes for Transcend and kingston IDs
libata: Fix several inaccuracies in developer's guide
slub: Fix bad boundary check in init_kmem_cache_nodes()
raid6: fix recovery performance regression
KEYS: call_sbin_request_key() must write lock keyrings before modifying them
KEYS: Use RCU dereference wrappers in keyring key type code
KEYS: find_keyring_by_name() can gain access to a freed keyring
ALSA: hda: Fix 0 dB for Packard Bell models using Conexant CX20549 (Venice)
ALSA: hda - Add quirk for Dell Inspiron 19T using a Conexant CX20582
ALSA: take tu->qlock with irqs disabled
...
Diffstat (limited to 'fs/ocfs2/file.c')
| -rw-r--r-- | fs/ocfs2/file.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 17947dc8341e..a5fbd9cea968 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
| @@ -684,6 +684,7 @@ restarted_transaction: | |||
| 684 | if (why == RESTART_META) { | 684 | if (why == RESTART_META) { |
| 685 | mlog(0, "restarting function.\n"); | 685 | mlog(0, "restarting function.\n"); |
| 686 | restart_func = 1; | 686 | restart_func = 1; |
| 687 | status = 0; | ||
| 687 | } else { | 688 | } else { |
| 688 | BUG_ON(why != RESTART_TRANS); | 689 | BUG_ON(why != RESTART_TRANS); |
| 689 | 690 | ||
| @@ -1981,18 +1982,18 @@ relock: | |||
| 1981 | /* communicate with ocfs2_dio_end_io */ | 1982 | /* communicate with ocfs2_dio_end_io */ |
| 1982 | ocfs2_iocb_set_rw_locked(iocb, rw_level); | 1983 | ocfs2_iocb_set_rw_locked(iocb, rw_level); |
| 1983 | 1984 | ||
| 1984 | if (direct_io) { | 1985 | ret = generic_segment_checks(iov, &nr_segs, &ocount, |
| 1985 | ret = generic_segment_checks(iov, &nr_segs, &ocount, | 1986 | VERIFY_READ); |
| 1986 | VERIFY_READ); | 1987 | if (ret) |
| 1987 | if (ret) | 1988 | goto out_dio; |
| 1988 | goto out_dio; | ||
| 1989 | 1989 | ||
| 1990 | count = ocount; | 1990 | count = ocount; |
| 1991 | ret = generic_write_checks(file, ppos, &count, | 1991 | ret = generic_write_checks(file, ppos, &count, |
| 1992 | S_ISBLK(inode->i_mode)); | 1992 | S_ISBLK(inode->i_mode)); |
| 1993 | if (ret) | 1993 | if (ret) |
| 1994 | goto out_dio; | 1994 | goto out_dio; |
| 1995 | 1995 | ||
| 1996 | if (direct_io) { | ||
| 1996 | written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos, | 1997 | written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos, |
| 1997 | ppos, count, ocount); | 1998 | ppos, count, ocount); |
| 1998 | if (written < 0) { | 1999 | if (written < 0) { |
| @@ -2007,7 +2008,10 @@ relock: | |||
| 2007 | goto out_dio; | 2008 | goto out_dio; |
| 2008 | } | 2009 | } |
| 2009 | } else { | 2010 | } else { |
| 2010 | written = __generic_file_aio_write(iocb, iov, nr_segs, ppos); | 2011 | current->backing_dev_info = file->f_mapping->backing_dev_info; |
| 2012 | written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos, | ||
| 2013 | ppos, count, 0); | ||
| 2014 | current->backing_dev_info = NULL; | ||
| 2011 | } | 2015 | } |
| 2012 | 2016 | ||
| 2013 | out_dio: | 2017 | out_dio: |
| @@ -2021,9 +2025,9 @@ out_dio: | |||
| 2021 | if (ret < 0) | 2025 | if (ret < 0) |
| 2022 | written = ret; | 2026 | written = ret; |
| 2023 | 2027 | ||
| 2024 | if (!ret && (old_size != i_size_read(inode) || | 2028 | if (!ret && ((old_size != i_size_read(inode)) || |
| 2025 | old_clusters != OCFS2_I(inode)->ip_clusters || | 2029 | (old_clusters != OCFS2_I(inode)->ip_clusters) || |
| 2026 | has_refcount)) { | 2030 | has_refcount)) { |
| 2027 | ret = jbd2_journal_force_commit(osb->journal->j_journal); | 2031 | ret = jbd2_journal_force_commit(osb->journal->j_journal); |
| 2028 | if (ret < 0) | 2032 | if (ret < 0) |
| 2029 | written = ret; | 2033 | written = ret; |
