diff options
author | Maxim Shchetynin <maxim@de.ibm.com> | 2008-04-01 15:12:20 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-03 13:11:11 +0200 |
commit | 7484839850d826e14b8b024bb048dca8489140ae (patch) | |
tree | 1fefb0a1417996a5db9de794dd344d7173bbc078 /arch/powerpc/kernel/rtas_flash.c | |
parent | [POWERPC] Fix deadlock with mmu_hash_lock in hash_page_sync (diff) | |
download | linux-7484839850d826e14b8b024bb048dca8489140ae.tar.xz linux-7484839850d826e14b8b024bb048dca8489140ae.zip |
[POWERPC] Fix rtas_flash procfs interface
Handling of the proc_dir_entry->count was changed in 2.6.24-rc5.
After this change, the default value for pde->count is 1 and not 0 as
before. Therefore, if we want to check whether our procfs file is
already opened (already in use), we have to check if pde->count is
greater than 2 rather than 1.
Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/rtas_flash.c')
-rw-r--r-- | arch/powerpc/kernel/rtas_flash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index f2276593f416..538baf46f15f 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c @@ -356,7 +356,7 @@ static int rtas_excl_open(struct inode *inode, struct file *file) /* 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; } |