+ int ret;
+#ifdef HAVE_NTFS_INODE_FUNCTIONS
+ ret = ntfs_set_inode_attributes(ni, dentry->attributes);
+#else
+ struct SECURITY_CONTEXT ctx;
+ u32 attributes_le32;
+ attributes_le32 = cpu_to_le32(dentry->attributes);
+ memset(&ctx, 0, sizeof(ctx));
+ ctx.vol = ni->vol;
+ ret = ntfs_xattr_system_setxattr(&ctx, XATTR_NTFS_ATTRIB,
+ ni, dir_ni,
+ (const char*)&attributes_le32,
+ sizeof(u32), 0);
+#endif
+ if (ret != 0) {