Commit 9a45400e authored by Peter Osterlund's avatar Peter Osterlund Committed by Linus Torvalds

[PATCH] Revert UDF inode semaphore locking

For some reason I don't understand, the last UDF filesystem update makes
the UDF deadlock when I write a bunch of mp3 files to a CDRW using the
packet writing patch.  Both "cp" and pdflush get stuck in __down. 

Reverting the semaphore changes makes the problem go away.  Use the
kernel lock again, until whatever recursive offender gets fixed.

(The offensive recursion seems to be: write() takes the inode semaphore,
causes memory pressure, and then trying to write back the inode or dirty
data to disk tries to get the semaphore again and deadlocks.)
parent 72f7e48f
...@@ -247,9 +247,9 @@ static int udf_release_file(struct inode * inode, struct file * filp) ...@@ -247,9 +247,9 @@ static int udf_release_file(struct inode * inode, struct file * filp)
{ {
if (filp->f_mode & FMODE_WRITE) if (filp->f_mode & FMODE_WRITE)
{ {
down(&inode->i_sem); lock_kernel();
udf_discard_prealloc(inode); udf_discard_prealloc(inode);
up(&inode->i_sem); unlock_kernel();
} }
return 0; return 0;
} }
......
...@@ -84,9 +84,9 @@ void udf_put_inode(struct inode * inode) ...@@ -84,9 +84,9 @@ void udf_put_inode(struct inode * inode)
{ {
if (!(inode->i_sb->s_flags & MS_RDONLY)) if (!(inode->i_sb->s_flags & MS_RDONLY))
{ {
down(&inode->i_sem); lock_kernel();
udf_discard_prealloc(inode); udf_discard_prealloc(inode);
up(&inode->i_sem); unlock_kernel();
} }
} }
......
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