aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs/file.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index cf3e6ced2d01..727533891813 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -668,10 +668,10 @@ map_buffer_cached:
668 * to, we need to read it in before the write, 668 * to, we need to read it in before the write,
669 * i.e. now. 669 * i.e. now.
670 */ 670 */
671 if (!buffer_uptodate(bh) && ((bh_pos < pos && 671 if (!buffer_uptodate(bh) && bh_pos < end &&
672 bh_end > pos) || 672 bh_end > pos &&
673 (bh_end > end && 673 (bh_pos < pos ||
674 bh_end > end))) { 674 bh_end > end)) {
675 /* 675 /*
676 * If the buffer is fully or partially 676 * If the buffer is fully or partially
677 * within the initialized size, do an 677 * within the initialized size, do an
@@ -784,10 +784,11 @@ retry_remap:
784 blocksize_bits); 784 blocksize_bits);
785 cdelta = 0; 785 cdelta = 0;
786 /* 786 /*
787 * If the number of remaining clusters in the 787 * If the number of remaining clusters touched
788 * @pages is smaller or equal to the number of 788 * by the write is smaller or equal to the
789 * cached clusters, unlock the runlist as the 789 * number of cached clusters, unlock the
790 * map cache will be used from now on. 790 * runlist as the map cache will be used from
791 * now on.
791 */ 792 */
792 if (likely(vcn + vcn_len >= cend)) { 793 if (likely(vcn + vcn_len >= cend)) {
793 if (rl_write_locked) { 794 if (rl_write_locked) {