Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4876
b: refs/heads/master
c: 9f993fe
h: refs/heads/master
v: v3
  • Loading branch information
Anton Altaparmakov committed Jun 25, 2005
1 parent 2a6ce98 commit 2f404a4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f2faef00c6af17542ea8672ed7d09367222b2d0
refs/heads/master: 9f993fe4634b39ca4404ba278053b03f360ec08a
4 changes: 4 additions & 0 deletions trunk/fs/ntfs/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ ToDo/Notes:
- Stamp the transaction log ($UsnJrnl), aka user space journal, if it
is active on the volume and we are mounting read-write or remounting
from read-only to read-write.
- Fix a bug in address space operations error recovery code paths where
if the runlist was not mapped at all and a mapping error occured we
would leave the runlist locked on exit to the function so that the
next access to the same file would try to take the lock and deadlock.

2.1.22 - Many bug and race fixes and error handling improvements.

Expand Down
16 changes: 12 additions & 4 deletions trunk/fs/ntfs/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ static int ntfs_read_block(struct page *page)
goto lock_retry_remap;
rl = NULL;
lcn = err;
}
} else if (!rl)
up_read(&ni->runlist.lock);
/* Hard error, zero out region. */
bh->b_blocknr = -1;
SetPageError(page);
Expand Down Expand Up @@ -690,7 +691,8 @@ static int ntfs_write_block(struct page *page, struct writeback_control *wbc)
goto lock_retry_remap;
rl = NULL;
lcn = err;
}
} else if (!rl)
up_read(&ni->runlist.lock);
/* Failed to map the buffer, even after retrying. */
bh->b_blocknr = -1;
ntfs_error(vol->sb, "Failed to write to inode 0x%lx, "
Expand Down Expand Up @@ -965,8 +967,11 @@ static int ntfs_write_mst_block(struct page *page,
if (err2 == -ENOMEM)
page_is_dirty = TRUE;
lcn = err2;
} else
} else {
err2 = -EIO;
if (!rl)
up_read(&ni->runlist.lock);
}
/* Hard error. Abort writing this record. */
if (!err || err == -ENOMEM)
err = err2;
Expand Down Expand Up @@ -1660,6 +1665,8 @@ static int ntfs_prepare_nonresident_write(struct page *page,
"not supported yet. "
"Sorry.");
err = -EOPNOTSUPP;
if (!rl)
up_read(&ni->runlist.lock);
goto err_out;
} else if (!is_retry &&
lcn == LCN_RL_NOT_MAPPED) {
Expand All @@ -1674,7 +1681,8 @@ static int ntfs_prepare_nonresident_write(struct page *page,
goto lock_retry_remap;
rl = NULL;
lcn = err;
}
} else if (!rl)
up_read(&ni->runlist.lock);
/*
* Failed to map the buffer, even after
* retrying.
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ntfs/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ typedef struct {
/* 56*/ le64 quota_charged; /* Byte size of the charge to
the quota for all streams of the file. Note: Is
zero if quotas are disabled. */
/* 64*/ USN usn; /* Last update sequence number
/* 64*/ leUSN usn; /* Last update sequence number
of the file. This is a direct index into the
transaction log file ($UsnJrnl). It is zero if
the usn journal is disabled or this file has
Expand Down

0 comments on commit 2f404a4

Please sign in to comment.