# endif /* HAVE_IOP_GET_LINK */
#endif /* HAVE_SYMLINK_OPS_USE_NAMEIDATA */
-#ifdef HAVE_INODEOPS_ENHANCED_GETATTR
/**
* ll_getattr_link() - link-specific getattr to set the correct st_size
* for encrypted symlinks
*
* Return: 0 on success, -errno on failure
*/
-static int ll_getattr_link(const struct path *path, struct kstat *stat,
+#if defined(HAVE_USER_NAMESPACE_ARG) || defined(HAVE_INODEOPS_ENHANCED_GETATTR)
+static int ll_getattr_link(
+#if defined(HAVE_USER_NAMESPACE_ARG)
+ struct user_namespace *mnt_userns,
+#endif
+ const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int flags)
{
struct dentry *dentry = path->dentry;
const char *link;
int rc;
- rc = ll_getattr(path, stat, request_mask, flags);
+ rc = ll_getattr(mnt_userns, path, stat, request_mask, flags);
if (rc || !IS_ENCRYPTED(inode))
return rc;
#define ll_getattr_link ll_getattr
#endif
-
const struct inode_operations ll_fast_symlink_inode_operations = {
#ifdef HAVE_IOP_GENERIC_READLINK
.readlink = generic_readlink,