Bugzilla – Attachment 304763 Details for
Bug 133718
memory allocation hangs during DVD-RAM writing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
convert iprune_mutex to rwsem
fs-iprune-rwsem.patch (text/plain), 1.98 KB, created by
Nick Piggin
on 2009-07-13 16:53:14 UTC
(
hide
)
Description:
convert iprune_mutex to rwsem
Filename:
MIME Type:
Creator:
Nick Piggin
Created:
2009-07-13 16:53:14 UTC
Size:
1.98 KB
patch
obsolete
>--- > fs/inode.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > >Index: linux-2.6/fs/inode.c >=================================================================== >--- linux-2.6.orig/fs/inode.c >+++ linux-2.6/fs/inode.c >@@ -25,6 +25,7 @@ > #include <linux/fsnotify.h> > #include <linux/mount.h> > #include <linux/async.h> >+#include <linux/rwsem.h> > > /* > * This is needed for the following functions: >@@ -93,7 +94,7 @@ DEFINE_SPINLOCK(inode_lock); > * from its final dispose_list, the struct super_block they refer to > * (for inode->i_sb->s_op) may already have been freed and reused. > */ >-static DEFINE_MUTEX(iprune_mutex); >+static DECLARE_RWSEM(iprune_sem); > > /* > * Statistics gathering.. >@@ -365,7 +366,7 @@ static int invalidate_list(struct list_h > /* > * We can reschedule here without worrying about the list's > * consistency because the per-sb list of inodes must not >- * change during umount anymore, and because iprune_mutex keeps >+ * change during umount anymore, and because iprune_sem keeps > * shrink_icache_memory() away. > */ > cond_resched_lock(&inode_lock); >@@ -404,7 +405,7 @@ int invalidate_inodes(struct super_block > int busy; > LIST_HEAD(throw_away); > >- mutex_lock(&iprune_mutex); >+ down_write(&iprune_sem); > spin_lock(&inode_lock); > inotify_unmount_inodes(&sb->s_inodes); > fsnotify_unmount_inodes(&sb->s_inodes); >@@ -412,7 +413,7 @@ int invalidate_inodes(struct super_block > spin_unlock(&inode_lock); > > dispose_list(&throw_away); >- mutex_unlock(&iprune_mutex); >+ up_write(&iprune_sem); > > return busy; > } >@@ -451,7 +452,7 @@ static void prune_icache(int nr_to_scan) > int nr_scanned; > unsigned long reap = 0; > >- mutex_lock(&iprune_mutex); >+ down_read(&iprune_sem); > spin_lock(&inode_lock); > for (nr_scanned = 0; nr_scanned < nr_to_scan; nr_scanned++) { > struct inode *inode; >@@ -493,7 +494,7 @@ static void prune_icache(int nr_to_scan) > spin_unlock(&inode_lock); > > dispose_list(&freeable); >- mutex_unlock(&iprune_mutex); >+ up_read(&iprune_sem); > } > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 133718
:
224038
|
224046
| 304763 |
330750