Commit 1a487ff5 authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Fix error handling in fs/ntfs/quota.c::ntfs_mark_quotas_out_of_date()

      where we failed to release i_sem on the $Quota/$Q attribute inode.
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent baf615a2
...@@ -81,6 +81,8 @@ ToDo/Notes: ...@@ -81,6 +81,8 @@ ToDo/Notes:
where we cannot access any of the ntfs records in a page when a where we cannot access any of the ntfs records in a page when a
single one of them had an mst error. (Thanks to Ken MacFerrin for single one of them had an mst error. (Thanks to Ken MacFerrin for
the bug report.) the bug report.)
- Fix error handling in fs/ntfs/quota.c::ntfs_mark_quotas_out_of_date()
where we failed to release i_sem on the $Quota/$Q attribute inode.
2.1.21 - Fix some races and bugs, rewrite mft write code, add mft allocator. 2.1.21 - Fix some races and bugs, rewrite mft write code, add mft allocator.
......
...@@ -52,7 +52,7 @@ BOOL ntfs_mark_quotas_out_of_date(ntfs_volume *vol) ...@@ -52,7 +52,7 @@ BOOL ntfs_mark_quotas_out_of_date(ntfs_volume *vol)
ictx = ntfs_index_ctx_get(NTFS_I(vol->quota_q_ino)); ictx = ntfs_index_ctx_get(NTFS_I(vol->quota_q_ino));
if (!ictx) { if (!ictx) {
ntfs_error(vol->sb, "Failed to get index context."); ntfs_error(vol->sb, "Failed to get index context.");
return FALSE; goto err_out;
} }
err = ntfs_index_lookup(&qid, sizeof(qid), ictx); err = ntfs_index_lookup(&qid, sizeof(qid), ictx);
if (err) { if (err) {
...@@ -108,7 +108,8 @@ BOOL ntfs_mark_quotas_out_of_date(ntfs_volume *vol) ...@@ -108,7 +108,8 @@ BOOL ntfs_mark_quotas_out_of_date(ntfs_volume *vol)
ntfs_debug("Done."); ntfs_debug("Done.");
return TRUE; return TRUE;
err_out: err_out:
ntfs_index_ctx_put(ictx); if (ictx)
ntfs_index_ctx_put(ictx);
up(&vol->quota_q_ino->i_sem); up(&vol->quota_q_ino->i_sem);
return FALSE; return FALSE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment