mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 06:50:12 +00:00
Linux 4.9: inode_change_ok() becomes setattr_prepare()
Linux commit 31051c85b5e2 "fs: Give dentry to inode_change_ok() instead of inode" renames and modifies inode_change_ok(inode, attrs) to setattr_prepare(dentry, attrs). Modify OpenAFS to cope. Change-Id: I72f8dfbdbd25d7c775e9c35116e323ea4359e95c Reviewed-on: https://gerrit.openafs.org/12418 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
f21e3ef8ce
commit
8aeb711eea
@ -1082,6 +1082,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
||||
AC_CHECK_LINUX_FUNC([set_nlink],
|
||||
[#include <linux/fs.h>],
|
||||
[set_nlink(NULL, 1);])
|
||||
AC_CHECK_LINUX_FUNC([setattr_prepare],
|
||||
[#include <linux/fs.h>],
|
||||
[setattr_prepare(NULL, NULL);])
|
||||
AC_CHECK_LINUX_FUNC([sock_create_kern],
|
||||
[#include <linux/net.h>],
|
||||
[sock_create_kern(0, 0, 0, NULL);])
|
||||
|
@ -183,7 +183,11 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
|
||||
newattrs.ia_ctime = CURRENT_TIME;
|
||||
|
||||
/* avoid notify_change() since it wants to update dentry->d_parent */
|
||||
#ifdef HAVE_LINUX_SETATTR_PREPARE
|
||||
code = setattr_prepare(file_dentry(afile->filp), &newattrs);
|
||||
#else
|
||||
code = inode_change_ok(inode, &newattrs);
|
||||
#endif
|
||||
if (!code)
|
||||
code = afs_inode_setattr(afile, &newattrs);
|
||||
if (!code)
|
||||
|
Loading…
Reference in New Issue
Block a user