X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2Foverlayfs%2Fcopy_up.c;h=0fed532efa68d127adc8cbcc5755056495c45caf;hb=2ad4758cec48c159d776352b02e6984c3c362bff;hp=e5b616c93e11b673d870a880d5d6233f20da536a;hpb=1d011777cdbe7ae38a854a0cbeb6bdfbf724cce0;p=linux-2.6-microblaze.git diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index e5b616c93e11..0fed532efa68 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -84,6 +84,14 @@ int ovl_copy_xattr(struct super_block *sb, struct dentry *old, if (ovl_is_private_xattr(sb, name)) continue; + + error = security_inode_copy_up_xattr(name); + if (error < 0 && error != -EOPNOTSUPP) + break; + if (error == 1) { + error = 0; + continue; /* Discard */ + } retry: size = vfs_getxattr(old, name, value, value_size); if (size == -ERANGE) @@ -107,13 +115,6 @@ retry: goto retry; } - error = security_inode_copy_up_xattr(name); - if (error < 0 && error != -EOPNOTSUPP) - break; - if (error == 1) { - error = 0; - continue; /* Discard */ - } error = vfs_setxattr(new, name, value, size, 0); if (error) { if (error != -EOPNOTSUPP || ovl_must_copy_xattr(name))