mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
Linux 3.7: putname is no longer exported
putname is unexported in kernel 3.7. Add a compatibility inline afs_putname function and open code it if necessary. Change-Id: I5416067566f6332d77e5d91ce2b9cf7bc0c96dce Reviewed-on: http://gerrit.openafs.org/8237 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
This commit is contained in:
parent
1571e9b9f6
commit
fa3116567e
@ -908,6 +908,10 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
||||
[#include <linux/fs.h>
|
||||
#include <linux/namei.h>],
|
||||
[path_lookup(NULL, 0, NULL);])
|
||||
AC_CHECK_LINUX_FUNC([putname],
|
||||
[#include <linux/fs.h>
|
||||
#include <linux/namei.h>],
|
||||
[putname(NULL);])
|
||||
AC_CHECK_LINUX_FUNC([rcu_read_lock],
|
||||
[#include <linux/rcupdate.h>],
|
||||
[rcu_read_lock();])
|
||||
|
@ -524,4 +524,13 @@ afs_dentry_open(struct dentry *dp, struct vfsmount *mnt, int flags, const struct
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
afs_putname(struct filename *name) {
|
||||
#if defined(HAVE_LINUX_PUTNAME)
|
||||
putname(name);
|
||||
#else
|
||||
kmem_cache_free(names_cachep, (void *)name);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* AFS_LINUX_OSI_COMPAT_H */
|
||||
|
@ -93,7 +93,7 @@ osi_lookupname(char *aname, uio_seg_t seg, int followlink,
|
||||
}
|
||||
code = osi_lookupname_internal(tname, followlink, NULL, dpp);
|
||||
if (seg == AFS_UIOUSER) {
|
||||
putname(tname);
|
||||
afs_putname(tname);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
@ -129,7 +129,7 @@ int osi_abspath(char *aname, char *buf, int buflen,
|
||||
mntput(mnt);
|
||||
}
|
||||
|
||||
putname(tname);
|
||||
afs_putname(tname);
|
||||
return code;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user