aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 18:44:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 18:44:27 -0400
commitac4de9543aca59f2b763746647577302fbedd57e (patch)
tree40407750569ee030de56233c41c9a97f7e89cf67 /fs/btrfs
parent26935fb06ee88f1188789807687c03041f3c70d9 (diff)
parentde32a8177f64bc62e1b19c685dd391af664ab13f (diff)
Merge branch 'akpm' (patches from Andrew Morton)
Merge more patches from Andrew Morton: "The rest of MM. Plus one misc cleanup" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (35 commits) mm/Kconfig: add MMU dependency for MIGRATION. kernel: replace strict_strto*() with kstrto*() mm, thp: count thp_fault_fallback anytime thp fault fails thp: consolidate code between handle_mm_fault() and do_huge_pmd_anonymous_page() thp: do_huge_pmd_anonymous_page() cleanup thp: move maybe_pmd_mkwrite() out of mk_huge_pmd() mm: cleanup add_to_page_cache_locked() thp: account anon transparent huge pages into NR_ANON_PAGES truncate: drop 'oldsize' truncate_pagecache() parameter mm: make lru_add_drain_all() selective memcg: document cgroup dirty/writeback memory statistics memcg: add per cgroup writeback pages accounting memcg: check for proper lock held in mem_cgroup_update_page_stat memcg: remove MEMCG_NR_FILE_MAPPED memcg: reduce function dereference memcg: avoid overflow caused by PAGE_ALIGN memcg: rename RESOURCE_MAX to RES_COUNTER_MAX memcg: correct RESOURCE_MAX to ULLONG_MAX mm: memcg: do not trap chargers with full callstack on OOM mm: memcg: rework and document OOM waiting and wakeup ...
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/free-space-cache.c4
-rw-r--r--fs/btrfs/inode.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index ef3bea7bb257..3f0ddfce96e6 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -221,12 +221,10 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root,
221 struct btrfs_path *path, 221 struct btrfs_path *path,
222 struct inode *inode) 222 struct inode *inode)
223{ 223{
224 loff_t oldsize;
225 int ret = 0; 224 int ret = 0;
226 225
227 oldsize = i_size_read(inode);
228 btrfs_i_size_write(inode, 0); 226 btrfs_i_size_write(inode, 0);
229 truncate_pagecache(inode, oldsize, 0); 227 truncate_pagecache(inode, 0);
230 228
231 /* 229 /*
232 * We don't need an orphan item because truncating the free space cache 230 * We don't need an orphan item because truncating the free space cache
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index db1e43948579..f338c5672d58 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4349,7 +4349,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
4349 inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); 4349 inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
4350 4350
4351 if (newsize > oldsize) { 4351 if (newsize > oldsize) {
4352 truncate_pagecache(inode, oldsize, newsize); 4352 truncate_pagecache(inode, newsize);
4353 ret = btrfs_cont_expand(inode, oldsize, newsize); 4353 ret = btrfs_cont_expand(inode, oldsize, newsize);
4354 if (ret) 4354 if (ret)
4355 return ret; 4355 return ret;