aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-10-19 06:53:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-10-19 06:53:59 -0400
commit998d75510e373aab5644d777d3b058312d550159 (patch)
treebb25edb328e4c4b4447c0a704c854c5d0b52dce3 /fs
parentd418d070057c45fd6f21567278f95452bfe690d1 (diff)
parent585d730d41120926e3f79a601edad3930fa28366 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "Rather a lot of fixes, almost all affecting mm/" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (26 commits) scripts/gdb: fix debugging modules on s390 kernel/events/uprobes.c: only do FOLL_SPLIT_PMD for uprobe register mm/thp: allow dropping THP from page cache mm/vmscan.c: support removing arbitrary sized pages from mapping mm/thp: fix node page state in split_huge_page_to_list() proc/meminfo: fix output alignment mm/init-mm.c: include <linux/mman.h> for vm_committed_as_batch mm/filemap.c: include <linux/ramfs.h> for generic_file_vm_ops definition mm: include <linux/huge_mm.h> for is_vma_temporary_stack zram: fix race between backing_dev_show and backing_dev_store mm/memcontrol: update lruvec counters in mem_cgroup_move_account ocfs2: fix panic due to ocfs2_wq is null hugetlbfs: don't access uninitialized memmaps in pfn_range_valid_gigantic() mm: memblock: do not enforce current limit for memblock_phys* family mm: memcg: get number of pages on the LRU list in memcgroup base on lru_zone_size mm/gup: fix a misnamed "write" argument, and a related bug mm/gup_benchmark: add a missing "w" to getopt string ocfs2: fix error handling in ocfs2_setattr() mm: memcg/slab: fix panic in __free_slab() caused by premature memcg pointer release mm/memunmap: don't access uninitialized memmap in memunmap_pages() ...
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/file.c2
-rw-r--r--fs/ocfs2/journal.c3
-rw-r--r--fs/ocfs2/localalloc.c3
-rw-r--r--fs/proc/meminfo.c4
-rw-r--r--fs/proc/page.c28
5 files changed, 24 insertions, 16 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 2e982db3e1ae..53939bf9d7d2 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1230,6 +1230,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
1230 transfer_to[USRQUOTA] = dqget(sb, make_kqid_uid(attr->ia_uid)); 1230 transfer_to[USRQUOTA] = dqget(sb, make_kqid_uid(attr->ia_uid));
1231 if (IS_ERR(transfer_to[USRQUOTA])) { 1231 if (IS_ERR(transfer_to[USRQUOTA])) {
1232 status = PTR_ERR(transfer_to[USRQUOTA]); 1232 status = PTR_ERR(transfer_to[USRQUOTA]);
1233 transfer_to[USRQUOTA] = NULL;
1233 goto bail_unlock; 1234 goto bail_unlock;
1234 } 1235 }
1235 } 1236 }
@@ -1239,6 +1240,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
1239 transfer_to[GRPQUOTA] = dqget(sb, make_kqid_gid(attr->ia_gid)); 1240 transfer_to[GRPQUOTA] = dqget(sb, make_kqid_gid(attr->ia_gid));
1240 if (IS_ERR(transfer_to[GRPQUOTA])) { 1241 if (IS_ERR(transfer_to[GRPQUOTA])) {
1241 status = PTR_ERR(transfer_to[GRPQUOTA]); 1242 status = PTR_ERR(transfer_to[GRPQUOTA]);
1243 transfer_to[GRPQUOTA] = NULL;
1242 goto bail_unlock; 1244 goto bail_unlock;
1243 } 1245 }
1244 } 1246 }
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 930e3d388579..699a560efbb0 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -217,7 +217,8 @@ void ocfs2_recovery_exit(struct ocfs2_super *osb)
217 /* At this point, we know that no more recovery threads can be 217 /* At this point, we know that no more recovery threads can be
218 * launched, so wait for any recovery completion work to 218 * launched, so wait for any recovery completion work to
219 * complete. */ 219 * complete. */
220 flush_workqueue(osb->ocfs2_wq); 220 if (osb->ocfs2_wq)
221 flush_workqueue(osb->ocfs2_wq);
221 222
222 /* 223 /*
223 * Now that recovery is shut down, and the osb is about to be 224 * Now that recovery is shut down, and the osb is about to be
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index 158e5af767fd..720e9f94957e 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -377,7 +377,8 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)
377 struct ocfs2_dinode *alloc = NULL; 377 struct ocfs2_dinode *alloc = NULL;
378 378
379 cancel_delayed_work(&osb->la_enable_wq); 379 cancel_delayed_work(&osb->la_enable_wq);
380 flush_workqueue(osb->ocfs2_wq); 380 if (osb->ocfs2_wq)
381 flush_workqueue(osb->ocfs2_wq);
381 382
382 if (osb->local_alloc_state == OCFS2_LA_UNUSED) 383 if (osb->local_alloc_state == OCFS2_LA_UNUSED)
383 goto out; 384 goto out;
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index ac9247371871..8c1f1bb1a5ce 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -132,9 +132,9 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
132 global_node_page_state(NR_SHMEM_THPS) * HPAGE_PMD_NR); 132 global_node_page_state(NR_SHMEM_THPS) * HPAGE_PMD_NR);
133 show_val_kb(m, "ShmemPmdMapped: ", 133 show_val_kb(m, "ShmemPmdMapped: ",
134 global_node_page_state(NR_SHMEM_PMDMAPPED) * HPAGE_PMD_NR); 134 global_node_page_state(NR_SHMEM_PMDMAPPED) * HPAGE_PMD_NR);
135 show_val_kb(m, "FileHugePages: ", 135 show_val_kb(m, "FileHugePages: ",
136 global_node_page_state(NR_FILE_THPS) * HPAGE_PMD_NR); 136 global_node_page_state(NR_FILE_THPS) * HPAGE_PMD_NR);
137 show_val_kb(m, "FilePmdMapped: ", 137 show_val_kb(m, "FilePmdMapped: ",
138 global_node_page_state(NR_FILE_PMDMAPPED) * HPAGE_PMD_NR); 138 global_node_page_state(NR_FILE_PMDMAPPED) * HPAGE_PMD_NR);
139#endif 139#endif
140 140
diff --git a/fs/proc/page.c b/fs/proc/page.c
index 544d1ee15aee..7c952ee732e6 100644
--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -42,10 +42,12 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf,
42 return -EINVAL; 42 return -EINVAL;
43 43
44 while (count > 0) { 44 while (count > 0) {
45 if (pfn_valid(pfn)) 45 /*
46 ppage = pfn_to_page(pfn); 46 * TODO: ZONE_DEVICE support requires to identify
47 else 47 * memmaps that were actually initialized.
48 ppage = NULL; 48 */
49 ppage = pfn_to_online_page(pfn);
50
49 if (!ppage || PageSlab(ppage) || page_has_type(ppage)) 51 if (!ppage || PageSlab(ppage) || page_has_type(ppage))
50 pcount = 0; 52 pcount = 0;
51 else 53 else
@@ -216,10 +218,11 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf,
216 return -EINVAL; 218 return -EINVAL;
217 219
218 while (count > 0) { 220 while (count > 0) {
219 if (pfn_valid(pfn)) 221 /*
220 ppage = pfn_to_page(pfn); 222 * TODO: ZONE_DEVICE support requires to identify
221 else 223 * memmaps that were actually initialized.
222 ppage = NULL; 224 */
225 ppage = pfn_to_online_page(pfn);
223 226
224 if (put_user(stable_page_flags(ppage), out)) { 227 if (put_user(stable_page_flags(ppage), out)) {
225 ret = -EFAULT; 228 ret = -EFAULT;
@@ -261,10 +264,11 @@ static ssize_t kpagecgroup_read(struct file *file, char __user *buf,
261 return -EINVAL; 264 return -EINVAL;
262 265
263 while (count > 0) { 266 while (count > 0) {
264 if (pfn_valid(pfn)) 267 /*
265 ppage = pfn_to_page(pfn); 268 * TODO: ZONE_DEVICE support requires to identify
266 else 269 * memmaps that were actually initialized.
267 ppage = NULL; 270 */
271 ppage = pfn_to_online_page(pfn);
268 272
269 if (ppage) 273 if (ppage)
270 ino = page_cgroup_ino(ppage); 274 ino = page_cgroup_ino(ppage);