summaryrefslogtreecommitdiff
path: root/include/linux/pagemap.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-10-11 11:18:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-11 11:18:04 -0700
commit3dd0130f2430decf0cb001b452824515436986d2 (patch)
tree3d3bb4ca9c5fe7372eb499bf9983d514ec2f5477 /include/linux/pagemap.h
parent5b697f86f9f136d200c9827d6eca0437b7eb96cf (diff)
parent4aab2be0983031a05cb4a19696c9da5749523426 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "Five fixes. Subsystems affected by this patch series: MAINTAINERS, mm/pagemap, mm/swap, and mm/hugetlb" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged mm: validate inode in mapping_set_error() mm: mmap: Fix general protection fault in unlink_file_vma() MAINTAINERS: Antoine Tenart's email address MAINTAINERS: change hardening mailing list
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r--include/linux/pagemap.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 7de11dcd534d..434c9c34aeb6 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -54,7 +54,8 @@ static inline void mapping_set_error(struct address_space *mapping, int error)
__filemap_set_wb_err(mapping, error);
/* Record it in superblock */
- errseq_set(&mapping->host->i_sb->s_wb_err, error);
+ if (mapping->host)
+ errseq_set(&mapping->host->i_sb->s_wb_err, error);
/* Record it in flags for now, for legacy callers */
if (error == -ENOSPC)