Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=266d4f40370757459f8aa063976c932d0de5e59b Commit: 266d4f40370757459f8aa063976c932d0de5e59b Parent: 7c368bb1049bde17fc4f8655492478d7f2918da9 Author: Hugh Dickins <[EMAIL PROTECTED]> AuthorDate: Tue Mar 6 19:20:11 2007 +0000 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue Mar 6 17:59:14 2007 -0800
[PATCH] suspend regression: sysfs deadlock Suspend deadlocks when trying to unregister /sys/block/sr0. This comes from Oliver's commit 94bebf4d1b8e7719f0f3944c037a21cfd99a4af7 "Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()". sysfs_write_file downs buffer->sem while calling flush_write_buffer, and flushing that particular write buffer entails downing buffer->sem in orphan_all_buffers, resulting in the obvious self-deadlock. Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/sysfs/inode.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index dd1344b..ccb7d72 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -227,11 +227,8 @@ static inline void orphan_all_buffers(struct inode *node) mutex_lock_nested(&node->i_mutex, I_MUTEX_CHILD); if (node->i_private) { - list_for_each_entry(buf, &set->associates, associates) { - down(&buf->sem); + list_for_each_entry(buf, &set->associates, associates) buf->orphaned = 1; - up(&buf->sem); - } } mutex_unlock(&node->i_mutex); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html