Skip to content

Commit

Permalink
support unlimited file and directory creation
Browse files Browse the repository at this point in the history
  • Loading branch information
szaka committed Sep 18, 2008
1 parent 01db330 commit f089c4b
Show file tree
Hide file tree
Showing 3 changed files with 327 additions and 37 deletions.
5 changes: 5 additions & 0 deletions libntfs-3g/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@ int ntfs_inode_free_space(ntfs_inode *ni, int size)
* find next, because we don't need such.
*/
while (ctx->ntfs_ino->mft_no != ni->mft_no) {
retry:
if (ntfs_attr_lookup(AT_UNUSED, NULL, 0, CASE_SENSITIVE,
0, NULL, 0, ctx)) {
err = errno;
Expand All @@ -1065,6 +1066,10 @@ int ntfs_inode_free_space(ntfs_inode *ni, int size)
}
}

if (ntfs_inode_base(ctx->ntfs_ino)->mft_no == FILE_MFT &&
ctx->attr->type == AT_DATA)
goto retry;

record_size = le32_to_cpu(ctx->attr->length);

/* Move away attribute. */
Expand Down
Loading

0 comments on commit f089c4b

Please sign in to comment.