summaryrefslogtreecommitdiff
path: root/fs/overlayfs/super.c
diff options
context:
space:
mode:
authorhujianyang <hujianyang@huawei.com>2014-11-24 18:25:21 +0800
committerMiklos Szeredi <mszeredi@suse.cz>2014-12-13 00:59:52 +0100
commitcead89bb08c0f64e23886f1c18df9bb98e97c55c (patch)
treedbf10b40ef83804ac343cbdf4f3776af685d1e62 /fs/overlayfs/super.c
parent1ba38725a351f91769918b132c17fb7fcaf6c2f5 (diff)
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/super.c')
-rw-r--r--fs/overlayfs/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index e9ce4a9e8749..84f3144e1b33 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -62,8 +62,6 @@ struct ovl_entry {
#define OVL_MAX_STACK 500
-const char *ovl_opaque_xattr = "trusted.overlay.opaque";
-
static struct dentry *__ovl_dentry_lower(struct ovl_entry *oe)
{
return oe->numlower ? oe->lowerstack[0].dentry : NULL;
@@ -254,7 +252,7 @@ static bool ovl_is_opaquedir(struct dentry *dentry)
if (!S_ISDIR(inode->i_mode) || !inode->i_op->getxattr)
return false;
- res = inode->i_op->getxattr(dentry, ovl_opaque_xattr, &val, 1);
+ res = inode->i_op->getxattr(dentry, OVL_XATTR_OPAQUE, &val, 1);
if (res == 1 && val == 'y')
return true;