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>
This commit is contained in:
parent
271849a988
commit
c0c1cc0e46
7 changed files with 39 additions and 26 deletions
|
|
@ -850,7 +850,7 @@ s64 __ntfs_cluster_free(struct inode *vi, const VCN start_vcn, s64 count,
|
|||
|
||||
/* This returns with ni->runlist locked for reading on success. */
|
||||
down_read(&ni->runlist.lock);
|
||||
rl = ntfs_find_vcn_nolock(ni, start_vcn, FALSE);
|
||||
rl = ntfs_attr_find_vcn_nolock(ni, start_vcn, FALSE);
|
||||
if (IS_ERR(rl)) {
|
||||
if (!is_rollback)
|
||||
ntfs_error(vol->sb, "Failed to find first runlist "
|
||||
|
|
@ -904,7 +904,7 @@ s64 __ntfs_cluster_free(struct inode *vi, const VCN start_vcn, s64 count,
|
|||
|
||||
/* Attempt to map runlist. */
|
||||
vcn = rl->vcn;
|
||||
rl = ntfs_find_vcn_nolock(ni, vcn, FALSE);
|
||||
rl = ntfs_attr_find_vcn_nolock(ni, vcn, FALSE);
|
||||
if (IS_ERR(rl)) {
|
||||
err = PTR_ERR(rl);
|
||||
if (!is_rollback)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue