aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/mft.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-03-07 16:43:38 -0500
committerAnton Altaparmakov <aia21@cantab.net>2005-05-05 06:20:49 -0400
commitc0c1cc0e46b36347f11b566f99087dc5e6fc1b89 (patch)
tree773105bdde7454d10dccc127048a9847f7e01f11 /fs/ntfs/mft.c
parent271849a98849394ea85fa7caa8a1aaa2b3a849b7 (diff)
NTFS: - Fix bug in fs/ntfs/attrib.c::ntfs_find_vcn_nolock() where after
dropping the read lock and taking the write lock we were not checking whether someone else did not already do the work we wanted to do. - Rename ntfs_find_vcn_nolock() to ntfs_attr_find_vcn_nolock(). - Tidy up some comments in fs/ntfs/runlist.c. - Add LCN_ENOMEM and LCN_EIO definitions to fs/ntfs/runlist.h. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/mft.c')
-rw-r--r--fs/ntfs/mft.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
index 66ef6e275a48..61ce09f1b652 100644
--- a/fs/ntfs/mft.c
+++ b/fs/ntfs/mft.c
@@ -1297,7 +1297,7 @@ static int ntfs_mft_bitmap_extend_allocation_nolock(ntfs_volume *vol)
1297 read_lock_irqsave(&mftbmp_ni->size_lock, flags); 1297 read_lock_irqsave(&mftbmp_ni->size_lock, flags);
1298 ll = mftbmp_ni->allocated_size; 1298 ll = mftbmp_ni->allocated_size;
1299 read_unlock_irqrestore(&mftbmp_ni->size_lock, flags); 1299 read_unlock_irqrestore(&mftbmp_ni->size_lock, flags);
1300 rl = ntfs_find_vcn_nolock(mftbmp_ni, 1300 rl = ntfs_attr_find_vcn_nolock(mftbmp_ni,
1301 (ll - 1) >> vol->cluster_size_bits, TRUE); 1301 (ll - 1) >> vol->cluster_size_bits, TRUE);
1302 if (unlikely(IS_ERR(rl) || !rl->length || rl->lcn < 0)) { 1302 if (unlikely(IS_ERR(rl) || !rl->length || rl->lcn < 0)) {
1303 up_write(&mftbmp_ni->runlist.lock); 1303 up_write(&mftbmp_ni->runlist.lock);
@@ -1727,8 +1727,8 @@ static int ntfs_mft_data_extend_allocation_nolock(ntfs_volume *vol)
1727 read_lock_irqsave(&mft_ni->size_lock, flags); 1727 read_lock_irqsave(&mft_ni->size_lock, flags);
1728 ll = mft_ni->allocated_size; 1728 ll = mft_ni->allocated_size;
1729 read_unlock_irqrestore(&mft_ni->size_lock, flags); 1729 read_unlock_irqrestore(&mft_ni->size_lock, flags);
1730 rl = ntfs_find_vcn_nolock(mft_ni, (ll - 1) >> vol->cluster_size_bits, 1730 rl = ntfs_attr_find_vcn_nolock(mft_ni,
1731 TRUE); 1731 (ll - 1) >> vol->cluster_size_bits, TRUE);
1732 if (unlikely(IS_ERR(rl) || !rl->length || rl->lcn < 0)) { 1732 if (unlikely(IS_ERR(rl) || !rl->length || rl->lcn < 0)) {
1733 up_write(&mft_ni->runlist.lock); 1733 up_write(&mft_ni->runlist.lock);
1734 ntfs_error(vol->sb, "Failed to determine last allocated " 1734 ntfs_error(vol->sb, "Failed to determine last allocated "