From: Nathan Lynch <ntl@pobox.com>
To: Jens Osterkamp <jens@de.ibm.com>
Cc: maxim@de.ibm.com, linuxppc-dev@ozlabs.org,
Paul Mackerras <paulus@samba.org>,
cbe-oss-dev@ozlabs.org
Subject: Re: [PATCH] RTAS - adapt procfs interface
Date: Tue, 1 Apr 2008 11:35:04 -0500 [thread overview]
Message-ID: <20080401163504.GP7137@localdomain> (raw)
In-Reply-To: <200804011512.20834.jens@de.ibm.com>
Jens Osterkamp wrote:
>
> Handling of the proc_dir_entry->count has being changed in 2.6.24-rc5.
Do you know which commit caused the change?
> 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;
> }
One could argue that the real problem is using the proc_dir_entry's
reference count to enforce exclusive open.
next prev parent reply other threads:[~2008-04-01 16:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 13:12 [PATCH] RTAS - adapt procfs interface Jens Osterkamp
2008-04-01 16:35 ` Nathan Lynch [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080401163504.GP7137@localdomain \
--to=ntl@pobox.com \
--cc=cbe-oss-dev@ozlabs.org \
--cc=jens@de.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=maxim@de.ibm.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).