File: 0005-linux-remove-implied-def-HAVE_LINUX_FILEMAP_GET_FOLI.patch

package info (click to toggle)
openafs 1.8.14-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 42,972 kB
  • sloc: ansic: 455,934; xml: 66,858; perl: 11,967; makefile: 10,038; sh: 7,955; objc: 6,354; java: 5,638; cpp: 2,268; asm: 1,214; yacc: 441; tcl: 249; lex: 201; csh: 85
file content (54 lines) | stat: -rw-r--r-- 2,227 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Thu, 23 Oct 2025 15:15:38 -0600
Subject: linux: remove implied def HAVE_LINUX_FILEMAP_GET_FOLIO

Commit:
  Linux: Use struct kiocb * for aops write_begin/end (1ad827ded0ed9)
added 2 implied defines in osi_vnodeops, one for
HAVE_LINUX_WRITE_BEGIN_END_FOLIO and one for HAVE_LINUX_FILEMAP_GET_FOLIO.
The HAVE_LINUX_FILEMAP_GET_FOLIO was not needed, and causes a build
failure:

  osi_vnodeops.c:4056:10: error: "HAVE_LINUX_FILEMAP_GET_FOLIO" redefined [-Werror]
   4056 | # define HAVE_LINUX_FILEMAP_GET_FOLIO
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is because the configure test for __filemap_get_folio() succeeds
(linux 6.15 and later) and the test for write_begin/end functions take a
kiocb also succeeds (6.17 or later).

Remove the unnecessary define.

Reviewed-on: https://gerrit.openafs.org/16589
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 503ef823970695eb646a323f38b9c07d52971e69)

Change-Id: I6a5768ac8e8f7cce79c5fbd67d5dcebfb4aead98
Reviewed-on: https://gerrit.openafs.org/16604
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit c379ff006d8b7db425f7648321c549ab24919d92)
---
 src/afs/LINUX/osi_vnodeops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index f7f67e6..5d06ae3 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -3797,10 +3797,9 @@ afs_linux_prepare_write(struct file *file, struct page *page, unsigned from,
 #if defined(HAVE_LINUX_WRITE_BEGIN_END_KIOCB)
 /*
  * When aops write_begin and write_end are passed a kiocb, it is implied that
- * write_begin and write_end take a folio and that __filemap_get_folio is present.
+ * write_begin and write_end take a folio.
  */
 # define HAVE_LINUX_WRITE_BEGIN_END_FOLIO
-# define HAVE_LINUX_FILEMAP_GET_FOLIO
 #endif
 
 #if defined(HAVE_LINUX_WRITE_BEGIN_END_FOLIO)