From: Edward Shishkin Problem: Processes fall into infinite loop when running in no-space-left-on-device situation. Fixup: Fixed leak of checkin_mutex in do_write_cryptcompress(); Signed-off-by: Andrew Morton --- fs/reiser4/plugin/file/cryptcompress.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff -puN fs/reiser4/plugin/file/cryptcompress.c~reiser4-fix-handling-enospc-cryptcompress fs/reiser4/plugin/file/cryptcompress.c --- a/fs/reiser4/plugin/file/cryptcompress.c~reiser4-fix-handling-enospc-cryptcompress +++ a/fs/reiser4/plugin/file/cryptcompress.c @@ -2707,7 +2707,8 @@ static loff_t do_write_cryptcompress(str if (result) goto out; if (cont->state == PSCHED_ASSIGNED_NEW) - goto out_no_release; + /* done_lh was called in write_pschedule_hook */ + goto out_no_longterm_lock; result = prepare_logical_cluster(inode, pos, count, &clust, LC_APPOV); @@ -2779,9 +2780,9 @@ static loff_t do_write_cryptcompress(str } while (count); out: done_lh(&hint->lh); - mutex_unlock(&info->checkin_mutex); save_file_hint(file, hint); - out_no_release: + out_no_longterm_lock: + mutex_unlock(&info->checkin_mutex); kfree(hint); put_cluster_handle(&clust); assert("edward-195", _