summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/inode.c
diff options
context:
space:
mode:
authorhujianyang <hujianyang@huawei.com>2014-11-24 11:25:21 +0100
committerMiklos Szeredi <mszeredi@suse.cz>2014-12-13 00:59:52 +0100
commitcead89bb08c0f64e23886f1c18df9bb98e97c55c (patch)
treedbf10b40ef83804ac343cbdf4f3776af685d1e62 /fs/overlayfs/inode.c
parentovl: Cleanup redundant blank lines (diff)
downloadlinux-cead89bb08c0f64e23886f1c18df9bb98e97c55c.tar.xz
linux-cead89bb08c0f64e23886f1c18df9bb98e97c55c.zip
ovl: Use macros to present ovl_xattr
This patch adds two macros: OVL_XATTR_PRE_NAME and OVL_XATTR_PRE_LEN to present ovl_xattr name prefix and its length. Also, a new macro OVL_XATTR_OPAQUE is introduced to replace old *ovl_opaque_xattr*. Fix the length of "trusted.overlay." to *16*. Signed-off-by: hujianyang <hujianyang@huawei.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/overlayfs/inode.c')
-rw-r--r--fs/overlayfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 5ac1236afb15..04f124884687 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -205,7 +205,7 @@ static int ovl_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
static bool ovl_is_private_xattr(const char *name)
{
- return strncmp(name, "trusted.overlay.", 14) == 0;
+ return strncmp(name, OVL_XATTR_PRE_NAME, OVL_XATTR_PRE_LEN) == 0;
}
int ovl_setxattr(struct dentry *dentry, const char *name,