mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RAMFS
Date: Fri, 2 Feb 2001 18:57:09 +0100	[thread overview]
Message-ID: <20010202185709.A753@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <E14OiV8-0006hH-00@the-village.bc.nu>
In-Reply-To: <E14OiV8-0006hH-00@the-village.bc.nu>; from alan@lxorguk.ukuu.org.uk on Fri, Feb 02, 2001 at 03:51:53PM +0000

On Fri, Feb 02, 2001 at 03:51:53PM +0000, Alan Cox wrote:
> Does this fix the ramfs problem in -ac ?
> 
> --- fs/ramfs/inode.c~	Wed Jan 31 22:02:16 2001
> +++ fs/ramfs/inode.c	Fri Feb  2 14:51:47 2001
> @@ -174,7 +174,6 @@
>  		inode->i_blocks += IBLOCKS_PER_PAGE;
>  		rsb->free_pages--;
>  		SetPageDirty(page);
> -		UnlockPage(page);
>  	} else {
>  		ClearPageUptodate(page);
>  		ret = 0;
> @@ -264,6 +263,7 @@
>  
>  	if (! ramfs_alloc_page(inode, page))
>  		return -ENOSPC;
> +	UnlockPage(page);
>  	return 0;
>  }

No, so have to unlock it also, if you return -ENOSPC.

So the correct fix seems to be:

--- linux/fs/ramfs/inode.c~	Wed Jan 31 22:02:16 2001
+++ linux/fs/ramfs/inode.c	Fri Feb  2 14:51:47 2001
@@ -174,7 +174,6 @@
 		inode->i_blocks += IBLOCKS_PER_PAGE;
 		rsb->free_pages--;
 		SetPageDirty(page);
-		UnlockPage(page);
 	} else {
 		ClearPageUptodate(page);
 		ret = 0;
@@ -264,6 +263,9 @@
 
- 	if (! ramfs_alloc_page(inode, page))
+ 	if (! ramfs_alloc_page(inode, page)) {
+		UnlockPage(page);
 		return -ENOSPC;
+	}
+	UnlockPage(page);
 	return 0;
 }

This currently works for me (but using 2.4.0 + dwg-ramfs.patch + this patch)

Regards

Ingo Oeser
-- 
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
         <<<<<<<<<<<<       come and join the fun       >>>>>>>>>>>>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-02-02 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-02 15:51 RAMFS Alan Cox
2001-02-02 17:57 ` Ingo Oeser [this message]
2001-02-02 19:24   ` RAMFS Mike Galbraith
2001-02-02 20:41     ` RAMFS Ingo Oeser
2001-02-02 21:03       ` RAMFS Mike Galbraith
2001-02-03  7:13         ` RAMFS Mike Galbraith

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=20010202185709.A753@nightmaster.csn.tu-chemnitz.de \
    --to=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®