mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-01-25 10:12:13 +03:00
Linux 6.18: generic_drop_inode() and generic_delete_inode() renamed
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <robn@despairlabs.com>
This commit is contained in:
parent
7730109762
commit
aeff23939a
24
config/kernel-drop-inode.m4
Normal file
24
config/kernel-drop-inode.m4
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
dnl #
|
||||||
|
dnl # 6.18 API change
|
||||||
|
dnl # - generic_drop_inode() renamed to inode_generic_drop()
|
||||||
|
dnl # - generic_delete_inode() renamed to inode_just_drop()
|
||||||
|
dnl #
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GENERIC_DROP], [
|
||||||
|
ZFS_LINUX_TEST_SRC([inode_generic_drop], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
],[
|
||||||
|
struct inode *ip = NULL;
|
||||||
|
inode_generic_drop(ip);
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([ZFS_AC_KERNEL_INODE_GENERIC_DROP], [
|
||||||
|
AC_MSG_CHECKING([whether inode_generic_drop() exists])
|
||||||
|
ZFS_LINUX_TEST_RESULT([inode_generic_drop], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_INODE_GENERIC_DROP, 1,
|
||||||
|
[inode_generic_drop() exists])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
])
|
||||||
@ -137,6 +137,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
|||||||
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR
|
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR
|
||||||
ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE
|
ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE
|
||||||
ZFS_AC_KERNEL_SRC_NAMESPACE
|
ZFS_AC_KERNEL_SRC_NAMESPACE
|
||||||
|
ZFS_AC_KERNEL_SRC_INODE_GENERIC_DROP
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*)
|
powerpc*)
|
||||||
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
||||||
@ -258,6 +259,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
|||||||
ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR
|
ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR
|
||||||
ZFS_AC_KERNEL_SOPS_FREE_INODE
|
ZFS_AC_KERNEL_SOPS_FREE_INODE
|
||||||
ZFS_AC_KERNEL_NAMESPACE
|
ZFS_AC_KERNEL_NAMESPACE
|
||||||
|
ZFS_AC_KERNEL_INODE_GENERIC_DROP
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
powerpc*)
|
powerpc*)
|
||||||
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2011 Lawrence Livermore National Security, LLC.
|
* Copyright (C) 2011 Lawrence Livermore National Security, LLC.
|
||||||
* Copyright (C) 2015 Jörg Thalheim.
|
* Copyright (C) 2015 Jörg Thalheim.
|
||||||
|
* Copyright (c) 2025, Rob Norris <robn@despairlabs.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _ZFS_VFS_H
|
#ifndef _ZFS_VFS_H
|
||||||
@ -262,4 +263,10 @@ zpl_is_32bit_api(void)
|
|||||||
#define zpl_generic_fillattr(user_ns, ip, sp) generic_fillattr(ip, sp)
|
#define zpl_generic_fillattr(user_ns, ip, sp) generic_fillattr(ip, sp)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_INODE_GENERIC_DROP
|
||||||
|
/* 6.18 API change. These were renamed, alias the old names to the new. */
|
||||||
|
#define generic_delete_inode(ip) inode_just_drop(ip)
|
||||||
|
#define generic_drop_inode(ip) inode_generic_drop(ip)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _ZFS_VFS_H */
|
#endif /* _ZFS_VFS_H */
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* Copyright (c) 2011, Lawrence Livermore National Security, LLC.
|
* Copyright (c) 2011, Lawrence Livermore National Security, LLC.
|
||||||
* Copyright (c) 2023, Datto Inc. All rights reserved.
|
* Copyright (c) 2023, Datto Inc. All rights reserved.
|
||||||
* Copyright (c) 2025, Klara, Inc.
|
* Copyright (c) 2025, Klara, Inc.
|
||||||
|
* Copyright (c) 2025, Rob Norris <robn@despairlabs.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -33,6 +34,7 @@
|
|||||||
#include <sys/zpl.h>
|
#include <sys/zpl.h>
|
||||||
#include <linux/iversion.h>
|
#include <linux/iversion.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
|
#include <linux/vfs_compat.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* What to do when the last reference to an inode is released. If 0, the kernel
|
* What to do when the last reference to an inode is released. If 0, the kernel
|
||||||
@ -104,7 +106,7 @@ zpl_dirty_inode(struct inode *ip, int flags)
|
|||||||
* reporting memory pressure and requests OpenZFS release some memory (see
|
* reporting memory pressure and requests OpenZFS release some memory (see
|
||||||
* zfs_prune()).
|
* zfs_prune()).
|
||||||
*
|
*
|
||||||
* When set to 1, we call generic_delete_node(), which always returns "destroy
|
* When set to 1, we call generic_delete_inode(), which always returns "destroy
|
||||||
* immediately", resulting in inodes being destroyed immediately, releasing
|
* immediately", resulting in inodes being destroyed immediately, releasing
|
||||||
* their associated dnodes and dbufs to the dbuf cached and the ARC to be
|
* their associated dnodes and dbufs to the dbuf cached and the ARC to be
|
||||||
* evicted as normal.
|
* evicted as normal.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user