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>
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);])
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)