diff options
author | hujianyang <hujianyang@huawei.com> | 2014-11-24 18:25:21 +0800 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-12-13 00:59:52 +0100 |
commit | cead89bb08c0f64e23886f1c18df9bb98e97c55c (patch) | |
tree | dbf10b40ef83804ac343cbdf4f3776af685d1e62 /fs/overlayfs/inode.c | |
parent | 1ba38725a351f91769918b132c17fb7fcaf6c2f5 (diff) | |
download | linux-cead89bb08c0f64e23886f1c18df9bb98e97c55c.tar.bz2 |
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.c | 2 |
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, |