linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RTAS - adapt procfs interface
@ 2008-04-01 13:12 Jens Osterkamp
  2008-04-01 16:35 ` Nathan Lynch
  2008-04-04  0:12 ` Christoph Hellwig
  0 siblings, 2 replies; 10+ messages in thread
From: Jens Osterkamp @ 2008-04-01 13:12 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: maxim, linuxppc-dev, cbe-oss-dev


Hi,

rtas_flash was broken since 2.6.24-rc5. This patch fixes it.
I think this is a good bugfix candidate for 2.6.25.

Jens

---

From: Maxim Shchetynin <maxim@de.ibm.com>

Handling of the proc_dir_entry->count has being changed in 2.6.24-rc5.
After this change the default value for pde->count is 1 and not 0 as it
was in earlier kernels. Therefore, if we want to check wether our procfs
file is already opened (already in use), we have to check if pde->count
is not greater than 2 but not 1.

Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Jens Osterkamp <jens@de.ibm.com>

Index: linux-2.6/arch/powerpc/kernel/rtas_flash.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/rtas_flash.c
+++ linux-2.6/arch/powerpc/kernel/rtas_flash.c
@@ -356,7 +356,7 @@ static int rtas_excl_open(struct inode *
 
 	/* Enforce exclusive open with use count of PDE */
 	spin_lock(&flash_file_open_lock);
-	if (atomic_read(&dp->count) > 1) {
+	if (atomic_read(&dp->count) > 2) {
 		spin_unlock(&flash_file_open_lock);
 		return -EBUSY;
 	}

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-04-04  9:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-01 13:12 [PATCH] RTAS - adapt procfs interface Jens Osterkamp
2008-04-01 16:35 ` Nathan Lynch
2008-04-01 20:04   ` Nathan Lynch
2008-04-02 11:34     ` Jens Osterkamp
2008-04-02 11:48     ` Paul Mackerras
2008-04-02 18:54       ` Nathan Lynch
2008-04-02 11:33   ` Jens Osterkamp
2008-04-04  0:12 ` Christoph Hellwig
2008-04-04  5:39   ` [Cbe-oss-dev] " Arnd Bergmann
2008-04-04  9:15     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).