HDFS-6629. Not able to create symlinks after HDFS-6516 (umamaheswararao)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/fs-encryption@1608389 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Charles Lamb 2014-07-07 09:51:49 +00:00
parent c386652828
commit 83702b0707
2 changed files with 12 additions and 9 deletions

View File

@ -37,6 +37,8 @@ fs-encryption (Unreleased)
HDFS-6516. List of Encryption Zones should be based on inodes (clamb)
HDFS-6629. Not able to create symlinks after HDFS-6516 (umamaheswararao)
OPTIMIZATIONS
BUG FIXES

View File

@ -2230,15 +2230,16 @@ public class FSDirectory implements Closeable {
public final void addToInodeMap(INode inode) {
if (inode instanceof INodeWithAdditionalFields) {
inodeMap.put(inode);
final XAttrFeature xaf = inode.getXAttrFeature();
if (xaf != null) {
final List<XAttr> xattrs = xaf.getXAttrs();
for (XAttr xattr : xattrs) {
final String xaName = XAttrHelper.getPrefixName(xattr);
if (CRYPTO_XATTR_ENCRYPTION_ZONE.equals(xaName)) {
encryptionZones.put(inode.getId(),
new EncryptionZoneInt(new String(xattr.getValue()),
inode.getId()));
if (!inode.isSymlink()) {
final XAttrFeature xaf = inode.getXAttrFeature();
if (xaf != null) {
final List<XAttr> xattrs = xaf.getXAttrs();
for (XAttr xattr : xattrs) {
final String xaName = XAttrHelper.getPrefixName(xattr);
if (CRYPTO_XATTR_ENCRYPTION_ZONE.equals(xaName)) {
encryptionZones.put(inode.getId(), new EncryptionZoneInt(
new String(xattr.getValue()), inode.getId()));
}
}
}
}