Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for_linus-20110831' of git://github.com/tytso/ext4

* tag 'for_linus-20110831' of git://github.com/tytso/ext4:
ext4: remove i_mutex lock in ext4_evict_inode to fix lockdep complaining

+18 -4
+1
fs/ext4/ext4.h
··· 175 175 */ 176 176 #define EXT4_IO_END_UNWRITTEN 0x0001 177 177 #define EXT4_IO_END_ERROR 0x0002 178 + #define EXT4_IO_END_QUEUED 0x0004 178 179 179 180 struct ext4_io_page { 180 181 struct page *p_page;
-3
fs/ext4/inode.c
··· 121 121 122 122 trace_ext4_evict_inode(inode); 123 123 124 - mutex_lock(&inode->i_mutex); 125 - ext4_flush_completed_IO(inode); 126 - mutex_unlock(&inode->i_mutex); 127 124 ext4_ioend_wait(inode); 128 125 129 126 if (inode->i_nlink) {
+17 -1
fs/ext4/page-io.c
··· 142 142 unsigned long flags; 143 143 int ret; 144 144 145 - mutex_lock(&inode->i_mutex); 145 + if (!mutex_trylock(&inode->i_mutex)) { 146 + /* 147 + * Requeue the work instead of waiting so that the work 148 + * items queued after this can be processed. 149 + */ 150 + queue_work(EXT4_SB(inode->i_sb)->dio_unwritten_wq, &io->work); 151 + /* 152 + * To prevent the ext4-dio-unwritten thread from keeping 153 + * requeueing end_io requests and occupying cpu for too long, 154 + * yield the cpu if it sees an end_io request that has already 155 + * been requeued. 156 + */ 157 + if (io->flag & EXT4_IO_END_QUEUED) 158 + yield(); 159 + io->flag |= EXT4_IO_END_QUEUED; 160 + return; 161 + } 146 162 ret = ext4_end_io_nolock(io); 147 163 if (ret < 0) { 148 164 mutex_unlock(&inode->i_mutex);