diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-11-25 12:55:17 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-11-25 12:55:17 +0800 |
| commit | 068e31608ab2e664dce897343a3e5d43c4f023e3 (patch) | |
| tree | 8f3cb76ede9e94d1abe48d3f94f627bb8864272f /fs | |
| parent | 662d618b983cd0566a1cc2ed28c09a0a4b07b9f3 (diff) | |
| parent | 5497d2d7d543b4b8854700d47a175e157fecbfd1 (diff) | |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Conflicts:
drivers/usb/gadget/function/u_ether.c
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/btrfs/inode.c | 9 | ||||
| -rw-r--r-- | fs/coredump.c | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 4bc9dbf29a73..3cff6523f27d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8691,9 +8691,14 @@ static void btrfs_invalidatepage(struct page *page, unsigned int offset, * So even we call qgroup_free_data(), it won't decrease reserved * space. * 2) Not written to disk - * This means the reserved space should be freed here. + * This means the reserved space should be freed here. However, + * if a truncate invalidates the page (by clearing PageDirty) + * and the page is accounted for while allocating extent + * in btrfs_check_data_free_space() we let delayed_ref to + * free the entire extent. */ - btrfs_qgroup_free_data(inode, page_start, PAGE_CACHE_SIZE); + if (PageDirty(page)) + btrfs_qgroup_free_data(inode, page_start, PAGE_SIZE); if (!inode_evicting) { clear_extent_bit(tree, page_start, page_end, EXTENT_LOCKED | EXTENT_DIRTY | diff --git a/fs/coredump.c b/fs/coredump.c index dfc87c5f5a54..5d15c4975ba1 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1,6 +1,7 @@ #include <linux/slab.h> #include <linux/file.h> #include <linux/fdtable.h> +#include <linux/freezer.h> #include <linux/mm.h> #include <linux/stat.h> #include <linux/fcntl.h> @@ -399,7 +400,9 @@ static int coredump_wait(int exit_code, struct core_state *core_state) if (core_waiters > 0) { struct core_thread *ptr; + freezer_do_not_count(); wait_for_completion(&core_state->startup); + freezer_count(); /* * Wait for all the threads to become inactive, so that * all the thread context (extended register state, like |
