mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
Linux: use standard macro for set_nlink configure test
A generic macro exists to test for functions in the kernel, use it for set_nlink. Reviewed-on: http://gerrit.openafs.org/6566 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: BuildBot <buildbot@rampaginggeek.com> (cherry picked from commit 64bd0b728ca95ba7bb4f1fdd909386fde3ce81e1) Change-Id: I93d169bec8f476d5e692f7f5a7fe31002af7ce1e Reviewed-on: http://gerrit.openafs.org/6569 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
e6ddb2a188
commit
39f0511911
@ -887,6 +887,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
||||
AC_CHECK_LINUX_FUNC([rcu_read_lock],
|
||||
[#include <linux/rcupdate.h>],
|
||||
[rcu_read_lock();])
|
||||
AC_CHECK_LINUX_FUNC([set_nlink],
|
||||
[#include <linux/fs.h>],
|
||||
[set_nlink(NULL, 1);])
|
||||
AC_CHECK_LINUX_FUNC([splice_direct_to_actor],
|
||||
[#include <linux/splice.h>],
|
||||
[splice_direct_to_actor(NULL,NULL,NULL);])
|
||||
@ -947,7 +950,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
||||
LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
|
||||
LINUX_HAVE_DCACHE_LOCK
|
||||
LINUX_D_COUNT_IS_INT
|
||||
LINUX_HAVE_SET_NLINK
|
||||
|
||||
dnl If we are guaranteed that keyrings will work - that is
|
||||
dnl a) The kernel has keyrings enabled
|
||||
|
@ -440,7 +440,7 @@ void
|
||||
vattr2inode(struct inode *ip, struct vattr *vp)
|
||||
{
|
||||
ip->i_ino = vp->va_nodeid;
|
||||
#ifdef HAVE_SET_NLINK
|
||||
#ifdef HAVE_LINUX_SET_NLINK
|
||||
set_nlink(ip, vp->va_nlink);
|
||||
#else
|
||||
ip->i_nlink = vp->va_nlink;
|
||||
|
@ -634,15 +634,3 @@ AC_DEFUN([LINUX_DOP_D_DELETE_TAKES_CONST], [
|
||||
[define if dentry.d_op->d_delete takes a const argument],
|
||||
[-Werror])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([LINUX_HAVE_SET_NLINK], [
|
||||
AC_CHECK_LINUX_BUILD([for set_nlink],
|
||||
[ac_cv_linux_have_set_nlink],
|
||||
[#include <linux/fs.h>],
|
||||
[struct inode _inode;
|
||||
set_nlink(&_inode, 1);],
|
||||
[HAVE_SET_NLINK],
|
||||
[define if set_nlink exists],
|
||||
[-Werror])
|
||||
])
|
||||
|
Loading…
x
Reference in New Issue
Block a user