aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/stree.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-11-13 17:05:14 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-26 11:34:56 -0800
commit2f21676d17f0c67263e87f13859682712b643323 (patch)
tree02d852bb83e5b9e9e1afd5155bbceaffb50c6693 /fs/reiserfs/stree.c
parenta7b8408f3c42adc601513bb7b8dae9ef05a1719e (diff)
downloadkernel_samsung_smdk4412-2f21676d17f0c67263e87f13859682712b643323.zip
kernel_samsung_smdk4412-2f21676d17f0c67263e87f13859682712b643323.tar.gz
kernel_samsung_smdk4412-2f21676d17f0c67263e87f13859682712b643323.tar.bz2
reiserfs: Move quota calls out of write lock
commit 7af11686933726e99af22901d622f9e161404e6b upstream. Calls into highlevel quota code cannot happen under the write lock. These calls take dqio_mutex which ranks above write lock. So drop write lock before calling back into quota code. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/reiserfs/stree.c')
-rw-r--r--fs/reiserfs/stree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index 313d39d..3ae9926 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -1968,7 +1968,9 @@ int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, struct tree
key2type(&(key->on_disk_key)));
#endif
+ reiserfs_write_unlock(inode->i_sb);
retval = dquot_alloc_space_nodirty(inode, pasted_size);
+ reiserfs_write_lock(inode->i_sb);
if (retval) {
pathrelse(search_path);
return retval;
@@ -2061,9 +2063,11 @@ int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
"reiserquota insert_item(): allocating %u id=%u type=%c",
quota_bytes, inode->i_uid, head2type(ih));
#endif
+ reiserfs_write_unlock(inode->i_sb);
/* We can't dirty inode here. It would be immediately written but
* appropriate stat item isn't inserted yet... */
retval = dquot_alloc_space_nodirty(inode, quota_bytes);
+ reiserfs_write_lock(inode->i_sb);
if (retval) {
pathrelse(path);
return retval;