File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,15 @@ static int remove_save_link_only(struct super_block *s,
190190static int reiserfs_quota_on_mount (struct super_block * , int );
191191#endif
192192
193- /* look for uncompleted unlinks and truncates and complete them */
193+ /*
194+ * Look for uncompleted unlinks and truncates and complete them
195+ *
196+ * Called with superblock write locked. If quotas are enabled, we have to
197+ * release/retake lest we call dquot_quota_on_mount(), proceed to
198+ * schedule_on_each_cpu() in invalidate_bdev() and deadlock waiting for the per
199+ * cpu worklets to complete flush_async_commits() that in turn wait for the
200+ * superblock write lock.
201+ */
194202static int finish_unfinished (struct super_block * s )
195203{
196204 INITIALIZE_PATH (path );
@@ -237,7 +245,9 @@ static int finish_unfinished(struct super_block *s)
237245 quota_enabled [i ] = 0 ;
238246 continue ;
239247 }
248+ reiserfs_write_unlock (s );
240249 ret = reiserfs_quota_on_mount (s , i );
250+ reiserfs_write_lock (s );
241251 if (ret < 0 )
242252 reiserfs_warning (s , "reiserfs-2500" ,
243253 "cannot turn on journaled "
You can’t perform that action at this time.
0 commit comments