Skip to content

Commit

Permalink
backport: use vm_flags_clear() with RHEL 9.5
Browse files Browse the repository at this point in the history
Fixes: 75ddbd8 ("fpga: dfl-cxl-cache: make pages readonly when biased toward device")
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
  • Loading branch information
pcolberg committed Nov 26, 2024
1 parent 0d1c5b9 commit f983b89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/fpga/dfl-cxl-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ static long cxl_cache_set_region_read_only(struct dfl_cxl_cache *cxl_cache,

/* Mark the pages as non-cached and write-protected. */
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) && RHEL_RELEASE_CODE < 0x905
vma->vm_flags &= ~VM_WRITE;
#else
vm_flags_clear(vma, VM_WRITE);
Expand Down

0 comments on commit f983b89

Please sign in to comment.