diff options
author | hujianyang <hujianyang@huawei.com> | 2014-11-24 13:25:21 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-12-13 02:59:52 +0300 |
commit | cead89bb08c0f64e23886f1c18df9bb98e97c55c (patch) | |
tree | dbf10b40ef83804ac343cbdf4f3776af685d1e62 /fs/overlayfs/dir.c | |
parent | 1ba38725a351f91769918b132c17fb7fcaf6c2f5 (diff) | |
download | linux-cead89bb08c0f64e23886f1c18df9bb98e97c55c.tar.xz |
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/dir.c')
-rw-r--r-- | fs/overlayfs/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index dcae3ac5aa76..0dc4c33a0a1b 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -118,14 +118,14 @@ int ovl_create_real(struct inode *dir, struct dentry *newdentry, static int ovl_set_opaque(struct dentry *upperdentry) { - return ovl_do_setxattr(upperdentry, ovl_opaque_xattr, "y", 1, 0); + return ovl_do_setxattr(upperdentry, OVL_XATTR_OPAQUE, "y", 1, 0); } static void ovl_remove_opaque(struct dentry *upperdentry) { int err; - err = ovl_do_removexattr(upperdentry, ovl_opaque_xattr); + err = ovl_do_removexattr(upperdentry, OVL_XATTR_OPAQUE); if (err) { pr_warn("overlayfs: failed to remove opaque from '%s' (%i)\n", upperdentry->d_name.name, err); |