Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-14651 llite: extend inode methods with user namespace arg
[fs/lustre-release.git]
/
lustre
/
llite
/
symlink.c
diff --git
a/lustre/llite/symlink.c
b/lustre/llite/symlink.c
index
1319c09
..
1a4bf5f
100644
(file)
--- a/
lustre/llite/symlink.c
+++ b/
lustre/llite/symlink.c
@@
-258,7
+258,6
@@
static const char *ll_follow_link(struct dentry *dentry, void **cookie)
# endif /* HAVE_IOP_GET_LINK */
#endif /* HAVE_SYMLINK_OPS_USE_NAMEIDATA */
# 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
/**
* ll_getattr_link() - link-specific getattr to set the correct st_size
* for encrypted symlinks
@@
-280,7
+279,12
@@
static const char *ll_follow_link(struct dentry *dentry, void **cookie)
*
* Return: 0 on success, -errno on failure
*/
*
* 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;
u32 request_mask, unsigned int flags)
{
struct dentry *dentry = path->dentry;
@@
-289,7
+293,7
@@
static int ll_getattr_link(const struct path *path, struct kstat *stat,
const char *link;
int rc;
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;
if (rc || !IS_ENCRYPTED(inode))
return rc;
@@
-312,7
+316,6
@@
static int ll_getattr_link(const struct path *path, struct kstat *stat,
#define ll_getattr_link ll_getattr
#endif
#define ll_getattr_link ll_getattr
#endif
-
const struct inode_operations ll_fast_symlink_inode_operations = {
#ifdef HAVE_IOP_GENERIC_READLINK
.readlink = generic_readlink,
const struct inode_operations ll_fast_symlink_inode_operations = {
#ifdef HAVE_IOP_GENERIC_READLINK
.readlink = generic_readlink,