+static noinline_for_stack int
+load_object_id(ntfs_inode *ni, struct wim_inode *inode)
+{
+ OBJECT_ID_ATTR attr;
+ int len;
+
+ len = ntfs_get_ntfs_object_id(ni, (char *)&attr, sizeof(attr));
+ if (likely(len == -ENODATA || len == 0))
+ return 0;
+ if (len < 0)
+ return WIMLIB_ERR_NTFS_3G;
+ if (!inode_set_object_id(inode, &attr, len))
+ return WIMLIB_ERR_NOMEM;
+ return 0;
+}
+