wrappers for ->i_mutex access
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested}, inode_foo(inode) being mutex_foo(&inode->i_mutex). Please, use those for access to ->i_mutex; over the coming cycle ->i_mutex will become rwsem, with ->lookup() done with it held only shared. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -48,7 +48,7 @@ bool ntfs_mark_quotas_out_of_date(ntfs_volume *vol)
|
||||
ntfs_error(vol->sb, "Quota inodes are not open.");
|
||||
return false;
|
||||
}
|
||||
mutex_lock(&vol->quota_q_ino->i_mutex);
|
||||
inode_lock(vol->quota_q_ino);
|
||||
ictx = ntfs_index_ctx_get(NTFS_I(vol->quota_q_ino));
|
||||
if (!ictx) {
|
||||
ntfs_error(vol->sb, "Failed to get index context.");
|
||||
@@ -98,7 +98,7 @@ bool ntfs_mark_quotas_out_of_date(ntfs_volume *vol)
|
||||
ntfs_index_entry_mark_dirty(ictx);
|
||||
set_done:
|
||||
ntfs_index_ctx_put(ictx);
|
||||
mutex_unlock(&vol->quota_q_ino->i_mutex);
|
||||
inode_unlock(vol->quota_q_ino);
|
||||
/*
|
||||
* We set the flag so we do not try to mark the quotas out of date
|
||||
* again on remount.
|
||||
@@ -110,7 +110,7 @@ done:
|
||||
err_out:
|
||||
if (ictx)
|
||||
ntfs_index_ctx_put(ictx);
|
||||
mutex_unlock(&vol->quota_q_ino->i_mutex);
|
||||
inode_unlock(vol->quota_q_ino);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user