]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: don't call __mark_inode_dirty while holding i_lock
authorDave Chinner <dchinner@redhat.com>
Tue, 12 Apr 2011 09:18:08 +0000 (19:18 +1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Apr 2011 21:17:24 +0000 (14:17 -0700)
commitd3e7379a8cef48ea1df0c50fef2a74ef1959616c
tree3323e2860f7bf892c889270cf936a3c4a45f3b80
parent332cabb8a5ecb55bb456aeba7c259ea869284f7a
nfs: don't call __mark_inode_dirty while holding i_lock

nfs_scan_commit() is called with the inode->i_lock held, but it then
calls __mark_inode_dirty() while still holding the lock. This causes
a deadlock.

Push the inode->i_lock into nfs_scan_commit() so it can protect only
the parts of the code it needs to and can be dropped before the call
to __mark_inode_dirty() to avoid the deadlock.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Tested-by: Will Simoneau <simoneau@ele.uri.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfs/write.c