d_invalidate is now defined as void and does not have
a return value to check.
Reviewed-on: http://gerrit.openafs.org/11562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit
a42f01d5ebb13da575b3123800ee6990743155ab)
Change-Id: I8542404771c4a7962238efd9a53d7dfcf4011c96
Reviewed-on: http://gerrit.openafs.org/11569
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
LINUX_IOP_I_CREATE_TAKES_BOOL
LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED
LINUX_IOP_LOOKUP_TAKES_UNSIGNED
+ LINUX_D_INVALIDATE_IS_VOID
dnl If we are guaranteed that keyrings will work - that is
dnl a) The kernel has keyrings enabled
#endif
}
+static inline int
+afs_d_invalidate(struct dentry *dp)
+{
+#if defined(D_INVALIDATE_IS_VOID)
+ d_invalidate(dp);
+ return 0;
+#else
+ return d_invalidate(dp);
+#endif
+}
+
#endif /* AFS_LINUX_OSI_COMPAT_H */
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
+#include "osi_compat.h"
+
int
osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) {
int code;
dget(dentry);
spin_unlock(&inode->i_lock);
- if (d_invalidate(dentry) == -EBUSY) {
+ if (afs_d_invalidate(dentry) == -EBUSY) {
dput(dentry);
/* perhaps lock and try to continue? (use cur as head?) */
goto inuse;
[define if your iops.lookup takes an unsigned int argument],
[-Werror])
])
+
+
+AC_DEFUN([LINUX_D_INVALIDATE_IS_VOID], [
+ AC_CHECK_LINUX_BUILD([whether d_invalidate returns void],
+ [ac_cv_linux_func_d_invalidate_returns_void],
+ [#include <linux/fs.h>],
+ [
+ void d_invalidate(struct dentry *);
+ ],
+ [D_INVALIDATE_IS_VOID],
+ [define if your d_invalidate returns void],
+ [])
+])