X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2FLINUX%2Fosi_vnodeops.c;h=481ce87847f88301118bc91ac4089fc396f9d063;hp=62abc471d8efb7895ecbb685e4f2f6a9ec45cc9b;hb=89aeb71a3e23c944f58cfa9572e9eae4d2130d37;hpb=e597b879677d023165298adadfb88db031883ff4 diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 62abc47..481ce87 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1390,9 +1390,17 @@ afs_dentry_automount(afs_linux_path_t *path) { struct dentry *target; - /* avoid symlink resolution limits when resolving; we cannot contribute to - * an infinite symlink loop */ + /* + * Avoid symlink resolution limits when resolving; we cannot contribute to + * an infinite symlink loop. + * + * On newer kernels the field has moved to the private nameidata structure + * so we can't adjust it here. This may cause ELOOP when using a path with + * 40 or more directories that are not already in the dentry cache. + */ +#if defined(STRUCT_TASK_STRUCT_HAS_TOTAL_LINK_COUNT) current->total_link_count--; +#endif target = canonical_dentry(path->dentry->d_inode);