mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 5.14 compat: explicity assign set_page_dirty
Kernel 5.14 introduced a change where set_page_dirty of struct address_space_operations is no longer implicitly set to __set_page_dirty_buffers(), which ended up resulting in a NULL pointer deref in the kernel when it is attempted to be called. This change sets .set_page_dirty in the structure to __set_page_dirty_nobuffers(), which was introduced with the related patch set. The breaking change was introduce in commit 0af573780b0b13fceb7fabd49dc1b073cee9a507 to torvalds/linux.git. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes #12427
This commit is contained in:
committed by
Tony Hutter
parent
6385f4e70e
commit
4434baab11
@@ -33,6 +33,9 @@
|
||||
#include <sys/zfs_vfsops.h>
|
||||
#include <sys/zfs_vnops.h>
|
||||
#include <sys/zfs_project.h>
|
||||
#ifdef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||
#include <linux/pagemap.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* When using fallocate(2) to preallocate space, inflate the requested
|
||||
@@ -1018,6 +1021,9 @@ const struct address_space_operations zpl_address_space_operations = {
|
||||
.writepage = zpl_writepage,
|
||||
.writepages = zpl_writepages,
|
||||
.direct_IO = zpl_direct_IO,
|
||||
#ifdef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS
|
||||
.set_page_dirty = __set_page_dirty_nobuffers,
|
||||
#endif
|
||||
};
|
||||
|
||||
const struct file_operations zpl_file_operations = {
|
||||
|
||||
Reference in New Issue
Block a user