From f8da282552ef49e6eca72fe57596a370ba61fe91 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Tue, 14 Apr 2009 12:54:49 +0000 Subject: [PATCH] Branch b1_6 b=18399 Commit the new patch. --- .../patches/prune-icache-use-trylock-rhel5.patch | 13 +++++++++++++ .../patches/prune-icache-use-trylock-sles10.patch | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 lustre/kernel_patches/patches/prune-icache-use-trylock-rhel5.patch create mode 100644 lustre/kernel_patches/patches/prune-icache-use-trylock-sles10.patch diff --git a/lustre/kernel_patches/patches/prune-icache-use-trylock-rhel5.patch b/lustre/kernel_patches/patches/prune-icache-use-trylock-rhel5.patch new file mode 100644 index 0000000..beadec2 --- /dev/null +++ b/lustre/kernel_patches/patches/prune-icache-use-trylock-rhel5.patch @@ -0,0 +1,13 @@ +--- linux/fs/inode.c.orig 2009-01-24 03:28:57.000000000 +0800 ++++ linux/fs/inode.c 2009-01-24 03:30:18.000000000 +0800 +@@ -418,7 +418,9 @@ static void prune_icache(int nr_to_scan) + int nr_scanned; + unsigned long reap = 0; + +- mutex_lock(&iprune_mutex); ++ if (!mutex_trylock(&iprune_mutex)) ++ return; ++ + spin_lock(&inode_lock); + for (nr_scanned = 0; nr_scanned < nr_to_scan; nr_scanned++) { + struct inode *inode; diff --git a/lustre/kernel_patches/patches/prune-icache-use-trylock-sles10.patch b/lustre/kernel_patches/patches/prune-icache-use-trylock-sles10.patch new file mode 100644 index 0000000..51924f6 --- /dev/null +++ b/lustre/kernel_patches/patches/prune-icache-use-trylock-sles10.patch @@ -0,0 +1,13 @@ +--- linux/fs/inode.c.orig 2009-01-24 03:28:57.000000000 +0800 ++++ linux/fs/inode.c 2009-01-24 03:30:18.000000000 +0800 +@@ -418,7 +418,9 @@ static void prune_icache(int nr_to_scan) + int nr_scanned; + unsigned long reap = 0; + +- down(&iprune_sem); ++ if (down_trylock(&iprune_sem)) ++ return; ++ + spin_lock(&inode_lock); + for (nr_scanned = 0; nr_scanned < nr_to_scan; nr_scanned++) { + struct inode *inode; -- 1.8.3.1