aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/file.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index f447b783bb84..4d4975592668 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -88,9 +88,8 @@ static noinline int btrfs_copy_from_user(loff_t pos, int num_pages,
88 total_copied += copied; 88 total_copied += copied;
89 89
90 /* Return to btrfs_file_aio_write to fault page */ 90 /* Return to btrfs_file_aio_write to fault page */
91 if (unlikely(copied == 0)) { 91 if (unlikely(copied == 0))
92 break; 92 break;
93 }
94 93
95 if (unlikely(copied < PAGE_CACHE_SIZE - offset)) { 94 if (unlikely(copied < PAGE_CACHE_SIZE - offset)) {
96 offset += copied; 95 offset += copied;
@@ -162,13 +161,14 @@ static noinline int dirty_and_release_pages(struct btrfs_trans_handle *trans,
162 ClearPageChecked(p); 161 ClearPageChecked(p);
163 set_page_dirty(p); 162 set_page_dirty(p);
164 } 163 }
165 if (end_pos > isize) { 164
165 /*
166 * we've only changed i_size in ram, and we haven't updated
167 * the disk i_size. There is no need to log the inode
168 * at this time.
169 */
170 if (end_pos > isize)
166 i_size_write(inode, end_pos); 171 i_size_write(inode, end_pos);
167 /* we've only changed i_size in ram, and we haven't updated
168 * the disk i_size. There is no need to log the inode
169 * at this time.
170 */
171 }
172 return 0; 172 return 0;
173} 173}
174 174