Skip to content

unable to build spfs.ko on ubuntu 24.04 [linux-headers-6.14.0-37] #2

Description

@hidrv4

Following error on attempting to build spfs.ko:

sp_file.c:110:48: error: passing argument 4 of ‘block_write_begin’ from incompatible pointer type [-Werror=incompatible-pointer-types]
110 | ret = block_write_begin(mapping, pos, len, pagep, sp_get_block);
| ^~~~~
| |
| struct page **
In file included from sp_file.c:11:
/usr/src/linux-headers-6.14.0-37-generic/include/linux/buffer_head.h:262:32: note: expected ‘struct folio **’ but argument is of type ‘struct page **’
262 | struct folio **foliop, get_block_t *get_block);
| ~~~~~~~~~~~~~~~^~~~~~
sp_file.c: In function ‘sp_write_end’:
sp_file.c:128:68: error: passing argument 6 of ‘generic_write_end’ from incompatible pointer type [-Werror=incompatible-pointer-types]
128 | error = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
| ^~~~
| |
| struct page *
/usr/src/linux-headers-6.14.0-37-generic/include/linux/buffer_head.h:270:33: note: expected ‘struct folio *’ but argument is of type ‘struct page *’
270 | struct folio *, void );
| ^~~~~~~~~~~~~~
sp_file.c: At top level:
sp_file.c:157:35: error: initialization of ‘int (
)(struct file *, struct address_space , loff_t, unsigned int, struct folio **, void **)’ {aka ‘int ()(struct file *, struct address_space , long long int, unsigned int, struct folio **, void **)’} from incompatible pointer type ‘int ()(struct file *, struct address_space , loff_t, unsigned int, struct page **, void **)’ {aka ‘int ()(struct file *, struct address_space , long long int, unsigned int, struct page **, void **)’} [-Werror=incompatible-pointer-types]
157 | .write_begin = sp_write_begin,
| ^~~~~~~~~~~~~~
sp_file.c:157:35: note: (near initialization for ‘sp_aops.write_begin’)
sp_file.c:158:43: error: initialization of ‘int (
)(struct file *, struct address_space *, loff_t, unsigned int, unsigned int, struct folio *, void )’ {aka ‘int ()(struct file *, struct address_space *, long long int, unsigned int, unsigned int, struct folio *, void )’} from incompatible pointer type ‘int ()(struct file *, struct address_space *, loff_t, unsigned int, unsigned int, struct page *, void )’ {aka ‘int ()(struct file *, struct address_space *, long long int, unsigned int, unsigned int, struct page *, void *)’} [-Werror=incompatible-pointer-types]
158 | .write_end = sp_write_end,
| ^~~~~~~~~~~~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions